OpenStreetMap

GSOC 2018 work on PT Assistant

Posted by Biswesh on 7 August 2018 in English (English)

This is a gist of all the work that was done during the summer of 2018 under Google Summer Of Code (GSOC) to further improve the PT Assistant plugin which assists mappers in mapping Public Transport systems.

Aim of the Project

To further improve the plugin in a way that it helps mappers in mapping public transport systems with ease. The assistant should become smarter by the end of GSOC and should act as a true assistant with smarter decision making capabilities.

Final Result

The plugin is now much more capable, processing the data in the background and presenting the result to enable the mappers to make decisions especially with new features like Routing helper, Double splitter, smarter Roundabout splitter etc. All the major achievements of this summer have been listed below :

Addition of Routing Helper button to the Relation Editor

A new button in the Relation Editor which aims to help mappers in fixing all the problems in a relation using options that the helper provides.

The Routing helper runs through the selected relation once the button in the relation editor is clicked. It searches for any kind of violation in the existing ways such as one way direction violation or overlapping of ways etc. Then it gives users options to remove those ways and suggests them some solutions in the form of options. The helper also checks if there is any gap present in the relation and thus it also tries to fix them by giving the suitable list of possible solutions as options which the mapper can select to make the relation correct. So the mapper now doesn't need to care about the ways that are valid and that can be added as the helper already checks the validities and only then does it give any suggestion.

routing helper turn by turn image

The image above shows how the helper provides the options(1, 2, 3) to the mappers and they can just select one of them by pressing that button and those ways gets added to the relation automatically. Here white way is the current way and the grey way is the next way where the route has to go.

Another feature of the helper is that it also compares the ways with the other relations and gives an alternate solution based on those relations. We can change our set of options to that mode by pressing 0. Below is an example where the route helper is showing the ways from other relations.

routing helper image of routes from other relations

The images below show how the helper detects an error and gives options to the mapper to opt for a solution.

restriction violation

oneway violation

More about the button can be found here.

Addition of Double Splitter Map Mode

A Map mode which splits a given way(s) into 3 or 4 parts in which one can choose the tags that can be given to the ways that got split. It can be used on a single way, or on 2 adjacent ways to either split in 3 parts, or in 4 parts respectively. The mapper is then presented with a dialog for adding tags to the middle section.

More about the map mode can be found here.

Addition of PT Wizard

To help setup the JOSM editor a Wizard was created. It is a wizard which helps a mapper in making decisions regarding important features of PT Assistant plugin. One can go through the entire wizard by clicking on ok and choosing the appropriate options which suit their personal need. PT Wizard Image

Major improvements to Roundabout Splitter

  • The Roundabout splitter now correctly splits the roundabouts for the buses. Previously it used to violate oneway traffic, but now it works correctly.
  • The map mode now also works for cycle ways which were a lot more complex compared to buses. It has been a successful new feature to the splitter.

And if it can't find a solution then it opens the affected route relations for inspection.

Improvements in Edge Selection Map Mode

  • The multiple select option was added to the map mode which uses shift and ctrl to multi select and toggle.
  • The edge now also considers the mode of transport.
  • New rules were added. eg. stop position should end an edge.
  • Single common way between multiple edges now automatically get selected

Addition of Transfer of details of Stop to platform node using cursor position

Three new shortcuts with slightly different functionalities were added in which the stop/platform details got transferred to the platform node (which gets created on the place where the cursor is currently present).

These 3 new shortcuts are -

  1. shift + g
  2. ctrl + g
  3. alt + ctrl + g

Addition of New Public Transport menu on Tools menu

A new menu called Public Transport is now on the Tools menu which contains all the important actions related to public transport. Public Transport Menu

Addition of new PT Assistant Preference Tab

User settings are now stored under Edit => Preferences => PTAssistantPlugin settings. Preferences setting image

Code Base

Timeline

First Period (May 14 - June 9) :

Second Period (June 12 - July 7) :

Third Period (July 10 - August 14) :

Challenges Faced

There were many challenges that I faced during the program. Some of the challenges I faced are -

  • One of the biggest challenge was to deal with the large code base and understand them to some extent so that I can use them in my code.
  • Another challenge which I faced was when I was working on the routing helper. There many cases which needed to be taken care of. Initially the helper used to suggest a lot of wrong answers and was buggy but with time it started becoming more reliable and less buggy. Now it is at a stage where it is expected to give correct suggestions after taking into account all possible conditions and also it doesn't seem to crash that often.
  • Enhancing the roundabout splitter to include the cycleway was also a huge challenge due to its complexity. It again had the same issues where a lot of corner cases needed to be taken care of but finally it seems to work fine.
  • Initially the creation of wizard was also a difficult task as I had to make changes to some core functionalities from the wizard. Some of the changes were never designed to be changed from a plugin. This created some problems, but on solving each of them step by step we were able to make the wizard a success.

Overall Experience

It has been a great experience working with an amazing mentor like Jo(Polyglot). I would also like to thank Michael Zangl for his support in resolving all the technical issues I faced throughout the summer and also to Florian Schäfer who helped a lot in shifting the code from SVN to Git. Also a special thanks to Google for giving me such an opportunity to work with organisation like OpenStreetMap.

Comment from gileri on 13 August 2018 at 21:04

Thank you for your hard work !

Comment from Biswesh on 13 August 2018 at 21:09

Thanks @gileri for your comments. The diary is not yet complete and a lot many features which got added would soon be elaborated in the coming week.

Login to leave a comment