Skip to content

Instantly share code, notes, and snippets.

@EskiMag EskiMag/gist:800041
Created Jan 28, 2011

Embed
What would you like to do?
Meter to degrees based on Geographical Latitude
// Calculates the degree value of 1 meter at given geographical latitude
#define EARTH_RADIUS 6371000
- (double)meterToDegreeAtLatitude:(double)aLatitudeInDegrees {
double aLatitudeInRadians = aLatitudeInDegrees * (M_PI / 180);
return (1 / (cos(aLatitudeInRadians) * EARTH_RADIUS)) * (180 / M_PI);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.