<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Kerrick,</div><div class=""><br class=""></div><div class=""> Yup, the node ids are renumbered to pack them more densely and ensure that values fit inside an unsigned int (32 bits).</div><div class=""><br class=""></div><div class=""> The mapping *is* written to the `.nodes` file though, here:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/Project-OSRM/osrm-backend/blob/d189339495e223a6ceea21a73bb7e434775172fa/src/extractor/extractor.cpp#L550-L561" class="">https://github.com/Project-OSRM/osrm-backend/blob/d189339495e223a6ceea21a73bb7e434775172fa/src/extractor/extractor.cpp#L550-L561</a></div><div class=""><br class=""></div><div class=""> when this file is later read, we only load the coordinates from it, so the OSM values are there, but not used:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/Project-OSRM/osrm-backend/blob/d189339495e223a6ceea21a73bb7e434775172fa/include/engine/datafacade/internal_datafacade.hpp#L116-L129" class="">https://github.com/Project-OSRM/osrm-backend/blob/d189339495e223a6ceea21a73bb7e434775172fa/include/engine/datafacade/internal_datafacade.hpp#L116-L129</a></div><div class=""><br class=""></div><div class=""> 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.</div><div class=""><br class=""></div><div class=""> This will require extra RAM, which may or may not be a problem for you.</div><div class=""><br class=""></div><div class="">daniel</div><div class=""> </div><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 1, 2016, at 9:03 AM, Kerrick Staley <<a href="mailto:kstaley@lyft.com" class="">kstaley@lyft.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">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.</p><p dir="ltr" class="">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?</p><p dir="ltr" class="">Thanks,<br class="">
Kerrick</p>
_______________________________________________<br class="">OSRM-talk mailing list<br class=""><a href="mailto:OSRM-talk@openstreetmap.org" class="">OSRM-talk@openstreetmap.org</a><br class="">https://lists.openstreetmap.org/listinfo/osrm-talk<br class=""></div></blockquote></div><br class=""></body></html>