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

[feat] Expose native OSRM and Valhalla APIs #87

Open azarz opened 1 year ago

azarz commented 1 year ago

Feature

Expose native OSRM and Valhalla APIs

Is your feature request related to a problem? Please describe.

I would like to develop a web-based application using the maplibre-gl framework, and use the IGN routing APIs. The routing plugins available use native OSRM and Valhalla APIs to work, and I'd want to use them out of the box (https://github.com/maplibre/maplibre-gl-directions and https://github.com/watergis/mapbox-gl-valhalla)

Describe the solution you'd like

I'd like to be able to use the native APIs of OSRM and Valhalla on a road2 service (specifically, the one served by IGN). For example :

Tasks

lgrd commented 1 year ago

Hello @azarz, I like this idea. I prefer the second option and I would add a version. Something like {baseRoadUrl}/osrm/{osrmVersion}/driving/.... Is that possible with your framework ?

And how could we handle resources ?

azarz commented 1 year ago

Yes this is possible, the plugin only needs the url before /driving for OSRM and before /isochrone for Valhalla, so it doesn't matter what's before those. For the same reason, the resource should be before those parts of the urls, maybe something like : {baseRoad2Url}/osrm/{osrmVersion}/{resource}/driving/13.388860,52.517037;13.385983,52.496891?steps=true and {baseRoad2Url}/valhalla/{resource}/isochrone?json={"locations":[{"lat":-1.0825252603106321,"lon":35.47230915879868}],"costing":"pedestrian","contours":[{"time":10,"color":"0000ff"}],"polygons":true}

lgrd commented 1 year ago

Perfect ! Let's do it !

lgrd commented 5 months ago

Ok for OSRM. TODO for valhalla.