IGNF / road2

NodeJS routing server aggregating several popular routing engines (video presentation (french) : https://peertube.fr/w/75fwFoW2GP8tQSGLUXUpPP)
https://ignf.github.io/road2/
GNU General Public License v3.0
11 stars 3 forks source link

limited OSRM native routing API #98

Closed XavDmz closed 5 months ago

XavDmz commented 5 months ago

Limited OSRM native routing API for road2

Linked to issue #87. This PR covers only routing request and responses with OSRM formalism, and using an OSRM source engine.

OSRM query parameters, mandatory or not, are used if they already had an equivalent in road2's code. Other optional parameters are ignored. Aside from these ignored paramters, the request and response are compatible with OSRM specifications.

routeRequest has been updated with a property named engineExtras, a dictionary designed to contain engine response properties used by an API other than "simple". As an example, OSRM waypoint's distance to requested coordinates is such a property. osrmSource has been updated to set routeRequest.engineExtras with this kind of additional properties, necesssary to craft OSRM native API response.

XavDmz commented 5 months ago

The current state (https://github.com/IGNF/road2/pull/98/commits/d9d931b9cd442b4ddeea7370cff3ed5b97942016) has only been testing on a singular routing request, with intermediates coordinates / waypoints. The getcapabilties functionality, and both user and developper documentation, have not yet been updated. The former needs a rework to generate the GetCapabilities content dynamically, which will allow for easier porting to other APIs, as well as live update of capabilties description.