Is there a method in C# that will convert degrees into kilometers?

1280
4
02-25-2013 11:49 AM
Labels (1)
EzraSidran
New Contributor
Hi!

Is there a method in C# that will convert degrees (at a given longitude) to kilometers?

Thanks!
0 Kudos
4 Replies
ShaharBukra
New Contributor III
You will need to project your coordinate system to metric one, and then you will ba able to calc it witout any problem
0 Kudos
EzraSidran
New Contributor
Actually, I already have the value I need converted.
This is not going to be drawn on the screen.

Basically, I have two values:

float length, width;

Both of these values are in degrees at longitude X and a latitude Y.

What I need is a function that given the longitude and latitude convert to kilometers:

ConvertDegreesToKM(length, X, Y);
ConvertDegreesToKM(width, X, Y);

There's got to be some method to do this buried in ArcGIS because it automatically displays a kilometer scale in the corner of the map.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
A degree of latitude is approximately 111Km.
A degree of longitude is approximately 111Km at equator and decreases to zero as the meridians converge to the poles. The value is depending on the latitude and is approximately 111Km*cos(latitude).
0 Kudos
EzraSidran
New Contributor
A degree of latitude is approximately 111Km.
A degree of longitude is approximately 111Km at equator and decreases to zero as the meridians converge to the poles. The value is depending on the latitude and is approximately 111Km*cos(latitude).


Thanks. I've looked this up at http://www.zodiacal.com/tools/lat_table.php and, for example, it gave me a chart. I was hoping that there was some built in function.

I'll use your cos method.
0 Kudos