Opened 2 months ago
Last modified 4 weeks ago
#23904 assigned task
Write new routing plugin
Reported by: | taylor.smock | Owned by: | taylor.smock |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin | Version: | |
Keywords: | routing | Cc: |
Description (last modified by )
Problem:
Mappers attempting to debug why a routing engine does stupid things or takes poor routes.
Solution:
Show mappers a route with route instructions as they edit live.
Goals:
- Use production routing engines
- Show routing instructions in JOSM for given modes (pedestrian, biking, vehicle, and possibly public transport)
- [Stretch goal] If routing engine supports it, show weights for ways in given mode; this should allow debugging why a different route was not chosen.
MVP will use one of the specified routing engines and show routing instructions in JOSM.
I am currently investigating using valhalla for the initial routing engine. This will most likely require Java 22 for FFI support without JVM flags. Alternatively, I can use JNI or a derivative thereof. As an additional alternative, if the routing engine exposes a web interface or a command line interface, we can use those for routing support.
Possible implementation details:
Valhalla (MIT):
- Provides a C++ library (
libvalhalla
) - Provides a web interface
- Provides a CLI
OSRM (BSD 2-clause):
- Provides a C++ library
- Provides a web interface
OSMAnd (GPLv3):
- Java library and bindings already written (thanks to Android)
- Has some kind of web interface (see comment:2)
Organic Maps (Apache 2):
- Java library and bindings already written (thanks to Android)
Most likely, I will have to write the current edit layer to pbf in order to load it into a routing engine. There may be additional steps, such as converting the pbf to the engine specific format.
This plugin should completely replace the routing plugin which uses custom Java code for routing.
Attachments (0)
Change History (3)
comment:1 by , 2 months ago
Description: | modified (diff) |
---|
comment:2 by , 4 weeks ago
comment:3 by , 4 weeks ago
Description: | modified (diff) |
---|
I probably can't send the website arbitrary OSM data (AKA whatever the editor has changed); at a minimum, I'd have to spin up an instance on-device.
I could use it as a "status as of whenever OsmAnd updated their backend routing db".
Thanks for the information.
FYI OsmAnd also provides web interface at https://osmand.net/map/navigate/ and https://test.osmand.net/map/navigate/