Re: [OpenMap Users] Distance between two LatLonPoint's?

From: Øystein E. Thorvaldsen <>
Date: Wed, 14 Mar 2007 19:41:16 +0100
Jeroen van Dijk wrote:



Is there a method in OpenMap to calculate the distance between two LatLonPoint’s correctly (for example in kilometers)?




This depends on what you mean by correctly. LatLonPoint.distance(LatLonPoint toPoint) will return a float that represents the distance between the two points in radians. Use Length to convert to any other unit of measurement. This returned distance is not entirely correct, as it is based on a spherical model of the Earth. However, the margin of error should be about 0.5%.

If you need to compute the distance more accurately than this I think you'll have to do it outside OpenMap.

Øystein E. Thorvaldsen
-- [To unsubscribe to this list send an email to "" with the following text in the BODY of the message "unsubscribe openmap-users"] Received on Wed Mar 14 2007 - 15:23:16 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:08 EDT