[GraphHopper] the distance from the current location to the path

Peter K peathal at yahoo.de
Wed Sep 18 12:24:23 UTC 2013


Hi Dmitrie,

you could calculate the distance to every (close) edge of the path.

See the code I'm using in Location2NodesNtree.checkAdjacent ->
DistanceCalc.calcNormalizedEdgeDistance

Before you can use this method you have to check if you should use the
distance to the end points of the edge or if you should use the
perpendicular edge distance. This is done via DistanceCalc.validEdgeDistance

Kind Regards,
Peter.


> Hello!
> I have been writing the logic of doing the route. For example, if we
> left the route, you need to give a voice message.
> Do you have any idea how to check how far off the paved route the
> current position (gps)?
>
> Thank you!
> -- 
> ??????? ??????
>
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/graphhopper

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20130918/95b48989/attachment.html>


More information about the GraphHopper mailing list