Convert Longitude/Latitude dependent upon the location on the Earth

  • Thread starter Thread starter Tone L
  • Start date Start date
  • Tags Tags
    Convert Earth
Click For Summary
SUMMARY

This discussion focuses on converting longitude and latitude into useful units, specifically kilometers, based on the Earth's shape. The participants clarify that the distance between degrees of latitude remains approximately constant at about 69 miles (111 kilometers), while the distance between degrees of longitude varies with latitude, calculated using the cosine of the latitude. For example, at 80 degrees latitude, 10 degrees of longitude equates to approximately 120 miles. The conversation also highlights the importance of considering the Earth's ellipsoidal shape for accurate geospatial calculations.

PREREQUISITES
  • Understanding of geographic coordinate systems
  • Familiarity with spherical and ellipsoidal Earth models
  • Knowledge of trigonometric functions, particularly cosine
  • Basic programming skills for implementing geospatial calculations
NEXT STEPS
  • Research the Vincenty formula for calculating distances on ellipsoids
  • Learn about the Haversine formula for spherical distance calculations
  • Explore the World Geodetic System 1984 (WGS84) for geospatial applications
  • Implement a conversion function from latitude and longitude to Cartesian coordinates
USEFUL FOR

Geographers, cartographers, software developers working with geospatial data, and anyone involved in satellite observation or mapping projects will benefit from this discussion.

Tone L
Messages
72
Reaction score
7
I am planning to plot all the observations made by a satellite in two respective grid boxes. One grid located at the equator and one grid located at the mid latitudes...

Each grid box will be a 10° x 10° box. However, due to the shape of the Earth the area of each box will indeed not be the same size. Is there some formula to convert latitudinal and longitundal degrees dependent on location of earth? To some useful unit (km).

Thanks!
 
Earth sciences news on Phys.org
The north-south distances will be one to one everywhere. A simple conversion of the east-west distances will be proportional to the latitude.

For example, at the equator, 10 degrees in the east-west direction is 25,000 miles / 36 = 694 miles. This distance is essentially zero at the pole, so that it's a linear relationship as you move north and south. Therefore at 80 degrees north, 10 degrees of longitude would be a ninth of 694 or about 77 miles.

Note that these are simple approximations and do not take into account things like datums, etc.
 
Borg said:
A simple conversion of the east-west distances will be proportional to the latitude.
Hi Borg:

I am pretty certain that the longitude linear distance for 10 degrees is the same as the 10 degree distance at the equator times the cosine of the latitude. This is based on a spherical Earth. Some small and a bit complicated corrections would be needed for the Earth's approximately ellipsoidal shape. Smaller and even more complicated corrections are required if you want to take the actual shape of the Earth into consideration.

The longitudinal distance at the poles is zero. That is the grid "boxes" between 80 degrees and 90 degrees will be triangles.Regards,
Buzz
 
@Buzz Bloom I think that we're saying generally the same thing. The distance between two latitudes along a longitudinal line is the same for every degree of distance. It's the distance between two longitudinal lines that changes depending on the latitude.
 
Hmm. @Borg I do not see it quite your way.

As you know - The Earth is not a perfect sphere. So, Geodesy has a little complexity.
Each degree of latitude is approximately 69 miles (111 kilometers) apart. The range varies (due to the Earth's slightly ellipsoid shape) from 68.703 miles (110.567 km) at the equator to 69.407 (111.699 km) at the poles. This is convenient because each minute (1/60th of a degree) is approximately one [nautical] mile.

Parallel distances across longitude A to longitude B is more interesting.
@Anthony LaRosa
What exactly do you need? How much accuracy? The usual choice is probably a great circle distance between two points given a lat long for each one.
See Vincenty formula for special case of ellipsoids:
https://en.wikipedia.org/wiki/Vincenty's_formulae

You can often use haversines because if the N/S differences are small a spherical approximation is probably okay:
https://en.wikipedia.org/wiki/Haversine_formula

It gets more interesting if you are doing some kind of surveying, where accuracy needs to greater than locating the nearest McDonalds restuarant.

You get to decide.
 
  • Like
Likes   Reactions: Tone L
jim mcnamara said:
Hmm. @Borg I do not see it quite your way.
Each degree of latitude is approximately 69 miles (111 kilometers) apart. The range varies (due to the Earth's slightly ellipsoid shape) from 68.703 miles (110.567 km) at the equator to 69.407 (111.699 km) at the poles. This is convenient because each minute (1/60th of a degree) is approximately one [nautical] mile.
As you know - The Earth is not a perfect sphere. So, Geodesy has a little complexity.
I must be wording things in a way that is confusing. Yes, I agree that the distance between each degree of latitude is mostly the same (ignoring the spheroid issue). Stated your way, I've been trying to say that the distance between each degree of longitude varies proportionally to the latitude.
 
  • Like
Likes   Reactions: Tone L
jim mcnamara said:
It gets more interesting if you are doing some kind of surveying, where accuracy needs to greater than locating the nearest McDonalds restuarant.
This is the real question. Most of this depends on how accurate the OP wants to be. A simple conversion gets your nuke on the right block. Taking the rest into account let's you pick whose window you want to put it through. :oldtongue:
 
Borg said:
The north-south distances will be one to one everywhere. A simple conversion of the east-west distances will be proportional to the latitude.

For example, at the equator, 10 degrees in the east-west direction is 25,000 miles / 36 = 694 miles. This distance is essentially zero at the pole, so that it's a linear relationship as you move north and south. Therefore at 80 degrees north, 10 degrees of longitude would be a ninth of 694 or about 77 miles.

Note that these are simple approximations and do not take into account things like datums, etc.

Borg said:
I must be wording things in a way that is confusing. Yes, I agree that the distance between each degree of latitude is mostly the same (ignoring the spheroid issue). Stated your way, I've been trying to say that the distance between each degree of longitude varies proportionally to the latitude.

@Borg. You keep saying that it is proportional to the latitude. This is not true. As BuzzBloom said, the distance between two longitude lines depends on the cosine of the latitude. So, while 10 degrees of longitude is 694 miles at the equator, at 80 degrees latitude it is 694 * cos(80) = 120 miles, not the 77 miles you quoted. At 10 degrees latitude, your linear approximation would say 10 degrees of longitude is 694 * 8/9 = 617 miles, while the correct answer is at 10 degrees latitude, 10 degrees of longitude = 694 * cos(10) = 683 miles. These differences are large, and will not get you "on the right block".
 
  • Like
Likes   Reactions: Tone L, jim mcnamara and Borg
phyzguy said:
@Borg. You keep saying that it is proportional to the latitude. This is not true. As BuzzBloom said, the distance between two longitude lines depends on the cosine of the latitude. So, while 10 degrees of longitude is 694 miles at the equator, at 80 degrees latitude it is 694 * cos(80) = 120 miles, not the 77 miles you quoted. At 10 degrees latitude, your linear approximation would say 10 degrees of longitude is 694 * 8/9 = 617 miles, while the correct answer is at 10 degrees latitude, 10 degrees of longitude = 694 * cos(10) = 683 miles. These differences are large, and will not get you "on the right block".
Thanks for clarifying my mistake. It has been a long time since I've had to do those calculations.
 
  • #10
Ugh. What was I thinking yesterday? :oldruck:
 
  • #11
Find out about WGS84 here; https://en.wikipedia.org/wiki/World_Geodetic_System#WGS84
This code converts latitude, longitude and height to x, y, z coordinates in metres.
You can then map that to your grid box.
Code:
Sub wgs84(_
Byval latit As Double,_
Byval lng As Double,_
Byval h As Double,_
Byref x As Double,_
Byref y As Double,_
Byref z As Double )

Const a As Double = 6378137 ' Defined semi-major axis, metres
Const ba As Double = .9933056200098587 ' square of b to a ratio bb/aa
Const ee As Double = 6.694379990141316D-03 'square of first eccentricity f(2-f)

Dim As Double sinlat = Sin(latit)
Dim As Double RofC = a / Sqr(1 - ee * sinlat * sinlat) ' radius of curvature
Dim As Double term = (RofC + h) * Cos(latit)

x = term * Cos(lng) ' x-axis is Atlantic Ocean positive
y = term * Sin(lng) ' y-axis is Indian Ocean positive
z = (h + (RofC * ba)) * sinlat ' z-axis is North Pole positive

End Sub
 

Similar threads

  • · Replies 13 ·
Replies
13
Views
4K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
947
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
13K
Replies
35
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
17
Views
4K
  • · Replies 5 ·
Replies
5
Views
9K