Using OSM node/way id in Graphhopper

835 views Asked by At

I want to use Graphhopper for routing, by marking start and stop points using their OSM id instead of lat,lon coordinates. Is this possible? Is it also possible to get an edge using its OSM id?

Thanks

1

There are 1 answers

0
Karussell On BEST ANSWER

I do not see the use for GraphHopper, although it can be handy to have for other applications (not sure) but there are drawbacks. E.g. one OSM id matches to a list of edge ids, also the OSM id is not static and therefor not recommended to be used as identifier. E.g. assume the case where ways are merged or splitted.

That being said you would have to store the "OSM_ID to List" relation at import time. E.g. see OSMReader.getOsmIdOfInternalEdge for the opposite Map relation "edgeId to OSM_ID".