How can I find the closest point (from another one) on a street? When you calculate a route using GraphHopper, it finds the closest point (from the start point of the route) such that it is on a street, so how can I do that?
What exactly is that “closest edge”?
I tried:
EdgeIteratorState edge = qr.getClosestEdge();
PointList ghPoint3DS = edge.fetchWayGeometry(0);
for (int i = 0; i < ghPoint3DS.size(); i++) {
System.out.println("got point " + i + " along: " + ghPoint3DS.getLat(i) + ", " + ghPoint3DS.getLon(i));
}
But that does not give points along the closest road or way or similar. That gives points on a line a few Meters away on some way ca.50m away from the closest way.