<div dir="ltr">oh, in that case you probably need a mapping between internal node ids and osm node ids, which could be created when the osm file is read.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 9, 2014 at 2:47 PM, Emden R. Gansner <span dir="ltr"><<a href="mailto:erg@research.att.com" target="_blank">erg@research.att.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 12/8/14 6:14 PM, Thi Nguyen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You can use getLat() and getLon() in NodeAccess, if I understand your question correctly.<br>
</blockquote></span>
Thanks. I wasn't clear enough. A node in the OSM file possesses an id field. Is there some way to use that number to<br>
get the corresponding latitude and longitude or, equivalently, to get the internal id? Or perhaps I am not accessing the<br>
right class implementing NodeAccess. I tried using<br>
<br>
     int nodeId = .... // id from OSM file<br>
     GraphHopper hopper = ....  // graph has been loaded<br>
     GraphStorage graph = hopper.getGraph();<br>
     double lat = graph.getNodeAccess().<u></u>getLatitude(nodeId);   // array out of bounds error<br>
<br>
Again thanks.<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
GraphHopper mailing list<br>
<a href="mailto:GraphHopper@openstreetmap.org" target="_blank">GraphHopper@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/graphhopper" target="_blank">https://lists.openstreetmap.<u></u>org/listinfo/graphhopper</a><br>
</div></div></blockquote></div><br></div>