[OSRM-talk] Getting OSMNodeIDs in OSRM
daniel at mapbox.com
Mon Feb 1 17:25:27 UTC 2016
Yup, the node ids are renumbered to pack them more densely and ensure that values fit inside an unsigned int (32 bits).
The mapping *is* written to the `.nodes` file though, here:
when this file is later read, we only load the coordinates from it, so the OSM values are there, but not used:
here, you could add the OSM node values to a new array, then you'd have the lookup table you need to map the NodeIDs you have to the original OSM values.
This will require extra RAM, which may or may not be a problem for you.
> On Feb 1, 2016, at 9:03 AM, Kerrick Staley <kstaley at lyft.com> wrote:
> I want to create a binary that will take an input lat/long and give the two OSMNodeIDs representing the nearest road segment. I was able to hack something together using NearestPhantomNodes in the OSRM codebase, but I can't figure out how to go from the NodeIDs in the PhantomNode to OSMNodeIDs.
> It looks like the NodeID -> OSMNodeID mapping is dropped in osrm-extract/osrm-prepare. Is this the case? Can I use the .osrm or .osrm.nodes file to re-build the mapping?
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OSRM-talk