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.

On Tue, Dec 9, 2014 at 2:47 PM, Emden R. Gansner <[email protected]>
wrote:

> On 12/8/14 6:14 PM, Thi Nguyen wrote:
>
>> You can use getLat() and getLon() in NodeAccess, if I understand your
>> question correctly.
>>
> 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
> get the corresponding latitude and longitude or, equivalently, to get the
> internal id? Or perhaps I am not accessing the
> right class implementing NodeAccess. I tried using
>
>      int nodeId = .... // id from OSM file
>      GraphHopper hopper = ....  // graph has been loaded
>      GraphStorage graph = hopper.getGraph();
>      double lat = graph.getNodeAccess().getLatitude(nodeId);   // array
> out of bounds error
>
> Again thanks.
>
>
>
>
> _______________________________________________
> GraphHopper mailing list
> [email protected]
> https://lists.openstreetmap.org/listinfo/graphhopper
>
_______________________________________________
GraphHopper mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/graphhopper

Reply via email to