Hi Karim,

> 1. Given an Edge ID, how to get the (lat,lon) pairs that connect it?

via:

graph.getEdgeProps(edgeId, Integer.MIN_VALUE)
na = graph.getNodeAccess()
lat1/lon1 = na.getLat/Lon(edgeIteratorState.getBaseNode)
lat2/lon2 = na.getLat/Lon(edgeIteratorState.getAdjNode)


> 2. Given a single (lat, lon) pair, how to get which edge ID it belongs
> to? Because, with Map-matching, I will need atlas 2 points.

If you have multiple GPS points you should consider using the map
matching component <https://github.com/graphhopper/map-matching>.
Otherwise use the locationIndex.findClosest

Regards,
Peter
_______________________________________________
GraphHopper mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/graphhopper

Reply via email to