Snap to closest road taking into account altitude

Hello guys!

I noticed that for certain lat/lng the routing engine snaps wrongly to the closest road because there are very near roads at different altitudes (tunnels or bridges), causing a wrong route computation.

Is there any way to make the routing engine aware of the altitude to make more accurate the process of snapping?

Thanks in advance

Do you have an example?

There is also an option snap_preventions to motorways or similar: graphhopper/docs/web/api-doc.md at master · graphhopper/graphhopper · GitHub

Is there any way to make the routing engine aware of the altitude to make more accurate the process of snapping?

Not yet. Might be related to the second point in Indoor Routing · Issue #646 · graphhopper/graphhopper · GitHub

Can I use snap_preventions in combination with CH? I mean, snap_preventions can be configured in the GHRequest object without affecting the speed mode right? Because I am using CH and I need to keep it for performance reasons.

Many thanks

Yes, snap_preventions only influence the snapping not the weighting in the algorithm

1 Like

Hi, I’m also facing the same issue actually. I think it’s not about the altitude but about multi-layer road (tunnels, bridges) and also the quality of GPS coordinates that we want to snap to the nearest road segment.
@karussell - from what you are saying, does the snap_preventions only works for road type in OSM or I can also put like layer=1 or layer=-1 so graphhopper will prevent the GPS coordinates snapped with any road which has layer tag?

Thanks

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.