[mapserver-users] Convert Decimal Degrees to Meters

Trevor Banister Trevor at NeedHighSpeed.com
Wed Nov 21 02:19:41 EST 2001


It's a messy formula for Longitude, since it depends on Latitude.

Latitude is easier, and should be something like Meters = (Lat1DD - Lat2DD)
/ 360 * Radius of the earth in Meters

Longitude is essentially the same formula, but to compensate for different
Latitudes, take the Cosine of the Average Latitude and use it as a scalar
for the result.

So for Longitude:
Meters = (Lat1DD - Lat2DD) / 360 * Radius of the earth in Meters *
Cosine((Lat1DD + Lat2DD) / 2)

Taking the average might introduce some errors if Lat1DD and Lat2DD are far
apart. Someone smarter than me in math might be able to explain this.

To do true conversions (reprojections) to standard coordinate systems,
there's some C code at the website below that will convert from Lat/Long to
UTM (meters)

There should also be some good code in the reprojection library that is
included with MapServer.

http://sbcx.mit.edu/bathymetry/

Trevor Banister
Need High Speed, Inc.
Trevor at NeedHighSpeed.com
303-942-0979 x 10



-----Original Message-----
From: DebasishS at riskinc.com [mailto:DebasishS at riskinc.com]
Sent: Tuesday, November 20, 2001 10:31 PM
Subject: [mapserver-users] Convert Decimal Degrees to Meters



Hi,

I am trying to convert Decimal Degrees to Linear Units say Meters . Can
anybody provide me a formula to go about it.

thanks
Debasish Sahu.
Senior Software Engineer
RMS India.




More information about the mapserver-users mailing list