﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
23904	Write new routing plugin	taylor.smock	taylor.smock	"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:
1. Use production routing engines
 * [https://github.com/valhalla/valhalla valhalla]
 * [https://github.com/osmandapp/OsmAnd OsmAnd]
 * [https://github.com/Project-OSRM/osrm-backend OSRM]
 * [https://github.com/organicmaps/organicmaps Organic Maps]
2. Show routing instructions in JOSM for given modes (pedestrian, biking, vehicle, and ''possibly'' public transport)
3. [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 [https://openjdk.org/jeps/454 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 [https://valhalla.github.io/valhalla/#command-line-tools CLI]
OSRM (BSD 2-clause):
* Provides a C++ library
* Provides a [https://project-osrm.org/docs/v5.24.0/api/# web] interface
OSMAnd (GPLv3):
* Java library and bindings already written (thanks to Android)
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 [https://josm.openstreetmap.de/browser/osm/applications/editors/josm/plugins/routing routing] plugin which uses custom Java code for routing."	task	assigned	normal		Plugin			routing	
