[Geographiclib-users] Comparing distances between geographic coordinates
Geographic library
Brought to you by:
karney
From: Edward L. <e4...@ya...> - 2014-05-17 19:45:15
|
Hi, I trying to write an app that performs route planning through a graph of points given by their GPS latitude/longitude coordinates. So to do this, I need to compare the relative distances between these points such that the triangle inequality holds. What is the best/fastest way to do so? There's a great deal of description on the web on how to compute distances between two GPS coordinates ranging from approximate ones based on the haversine formula via an idealized sphere to more accurate ellipsoidal ones like the one in GeographicLib. For this application, I don't need real distances between the points, just some metric so that the triangle inequality holds. I'm tempted to use the haversine formula since it is cheaper than the alternatives but it has distortions depending on the chosen radius that may affect the triangle inequality? Or am I over thinking this? Is there some projection I can use that is both cheap and accurate? Thanks, -Edward |