Converting latitude/longitude to Cartesian coords?

  • Context: High School 
  • Thread starter Thread starter kronchev
  • Start date Start date
  • Tags Tags
    Cartesian
Click For Summary

Discussion Overview

The discussion centers around methods for converting latitude and longitude coordinates into Cartesian coordinates. Participants explore various mathematical transformations and conventions, addressing both spherical and planar representations.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants propose using spherical coordinate transformations with equations involving angles θ (latitude) and φ (longitude), along with the Earth's radius ρ.
  • One participant suggests that the original poster may be looking for a 2D representation suitable for flat maps, noting that no flat map can accurately represent the spherical Earth without some form of distortion.
  • There is a contention regarding the definitions of θ and φ, with some participants arguing that the conventional definitions differ between texts, leading to confusion.
  • Another participant provides a "quick and dirty" method for converting coordinates, assuming a spherical Earth, using specific multipliers for latitude and longitude to yield Cartesian coordinates.
  • A further method is introduced involving more complex equations that account for height and the Earth's shape, referencing specific literature on geodesy.

Areas of Agreement / Disagreement

Participants express differing views on the definitions of angles in spherical coordinates, indicating a lack of consensus on the conventions used. Additionally, multiple methods for conversion are presented, with no agreement on a single preferred approach.

Contextual Notes

Participants note that the definitions of θ and φ can vary between mathematical and physical contexts, which may affect the interpretation of the conversion methods. The discussion also highlights the complexity of accurately representing spherical coordinates in a Cartesian system.

Who May Find This Useful

This discussion may be of interest to those studying geodesy, navigation, or coordinate transformations in mathematics and physics.

kronchev
Messages
31
Reaction score
0
Does anyone have a quick method to do this?
 
Mathematics news on Phys.org
It's just a straight application of the spherical coordinate transformation.

[tex]x = \rho \sin{\theta} \cos{\phi}[/tex]
[tex]y = \rho \sin{\theta} \sin{\phi}[/tex]
[tex]z = \rho \cos{\theta}[/tex]

Where [itex]\phi[/itex] is the longitude, [itex]\theta[/itex] is the latitude, and [itex]\rho[/itex] is the radius of the Earth.

cookiemonster
 
cookiemonster said:
It's just a straight application of the spherical coordinate transformation.

[tex]x = \rho \sin{\theta} \cos{\phi}[/tex]
[tex]y = \rho \sin{\theta} \sin{\phi}[/tex]
[tex]z = \rho \cos{\theta}[/tex]

Where [itex]\phi[/itex] is the longitude, [itex]\theta[/itex] is the latitude, and [itex]\rho[/itex] is the radius of the Earth.

cookiemonster
I believe [tex]z = \rho \cos{\phi}[/tex] and [tex]x = \rho \cos{\theta} \sin{\phi}[/tex] :smile:
 
Though I suspect that our original poster wanted 2 dimensional coordinates: like a flat map. Of course, you can't do that: no flat map of the world can be an isometric representation of the sphere. You would need to specify how that is to be handled.
 
deltabourne said:
I believe [tex]z = \rho \cos{\phi}[/tex] and [tex]x = \rho \cos{\theta} \sin{\phi}[/tex] :smile:


All you're doing there deltabourne is interchanging the values of theta and phi in cookiemonsters definition. Theta is normally used to denote the angle from the positve z axis and with that definition of theta cookiemonsters equations are correct.
 
Maybe this is an "America against the rest of the world" thing but every text I've ever seen defines φ to be the angle the straight line from (0,0,0) to the point makes with the positive z axis while θ is the angle the projection of that line onto the xy-plane makes with the positive x-axis.
 
HallsofIvy said:
Maybe this is an "America against the rest of the world" thing but every text I've ever seen defines φ to be the angle the straight line from (0,0,0) to the point makes with the positive z axis while θ is the angle the projection of that line onto the xy-plane makes with the positive x-axis.

Yes it looks like both conventions are in common use unfortunately. Here is what Mathworld has to say about it.

MathWorld said:
A system of curvilinear coordinates which is natural for describing positions on a sphere or spheroid. Define [tex]\theta[/tex] to be the azimuthal angle in the xy-plane from the x-axis and [tex]\phi[/tex] to be the polar angle from the z-axis with ...

Unfortunately, the convention in which the symbols and are reversed is frequently used, especially in physics, leading to unnecessary confusion. The symbol [tex]\rho[/tex] is sometimes also used in place of r. Arfken (1985) uses [tex](r, \phi, \theta)[/tex], whereas Beyer (1987) uses [tex](\rho, \theta, \phi)[/tex]. Be very careful when consulting the literature.
 
Aha! So instead of "America against the world", it is "Physicists against Mathematicians"!
 
kronchev said:
Does anyone have a quick method to do this?

The 'quick and dirty' method (assuming the Earth is a perfect sphere):

x = longitude*60*1852*cos(latitude)
y = latitude*60*1852

Latitude and longitude must be in decimal degrees, x and y are in meters.
The origin of the xy-grid is the intersection of the 0-degree meridian and the equator, where x is positive East and y is positive North.

So, why the 1852? I'm using the (original) definition of a nautical mile here: 1 nautical mile = the length of one arcminute on the equator (hence the 60*1852; I'm converting the lat/lon degrees to lat/lon minutes).
 
  • #10
kronchev said:
Does anyone have a quick method to do this?

X = (N+H) cos(phi) cos(lambda)
Y = (N+H) cos(phi) sin(lambda)
Z = [N(1-e^2)+H] sin(phi)

I have solved the inverse problem analytically as well as with other better methods.
This involves solving a complicated quartic eqation. See Vanicek & Krakiwsky, Geodesy.
There are other less efficient methods online. See Mathworks, e.g.

Ben Palmer
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K