Geographic coordinate conversion: Difference between revisions
JeremyCole (talk | contribs) Added Decimal to DMS conversion and example code. |
Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
(393 intermediate revisions by more than 100 users not shown) | |||
Line 1: | Line 1: | ||
{{short description|Overview of GPS conversion formulas}} |
|||
'''Geographic coordinates''' consist of [[latitude]] and [[longitude]]. There are many ways of writing coordinates, and converting between the different ways is non-obvious but also quite trivial. |
|||
In [[geodesy]], conversion among different geographic coordinate systems is made necessary by the different [[geographic coordinate system]]s in use across the world and over time. Coordinate conversion is composed of a number of different types of conversion: format change of geographic coordinates, conversion of coordinate systems, or transformation to different [[geodetic datum]]s. Geographic coordinate conversion has applications in [[cartography]], [[surveying]], [[navigation]] and [[geographic information systems]]. |
|||
In geodesy, geographic coordinate ''conversion'' is defined as translation among different coordinate formats or [[map projection]]s all referenced to the same geodetic datum.<ref name=Foster2009>{{cite web|author1=Roger Foster|author2=Dan Mullaney|title=Basic Geodesy Article 018: Conversions and Transformations|publisher=National Geospatial Intelligence Agency|url=http://earth-info.nga.mil/GandG/coordsys/geoarticles/pdfs/Article018_Conversions_and_Transformations.pdf|access-date=4 March 2014|archive-date=27 November 2020|archive-url=https://web.archive.org/web/20201127145627/https://earth-info.nga.mil/GandG/coordsys/geoarticles/pdfs/Article018_Conversions_and_Transformations.pdf|url-status=live}}</ref> A geographic coordinate ''transformation'' is a translation among different geodetic datums. Both geographic coordinate conversion and transformation will be considered in this article. |
|||
==Ways of Writing Coordinates== |
|||
This article assumes readers are already familiar with the content in the articles [[geographic coordinate system]] and [[geodetic datum]]. |
|||
All of the following are valid and acceptable ways to write geographic coordinates: |
|||
==Change of units and format== |
|||
* 40:26:46N,79:56:55W |
|||
* 40:26:46.302N 79:56:55.903W |
|||
* 40°26'21"N 79°58'36"W |
|||
* 40d 26' 21" N 79d 58' 36" W |
|||
* 40.446195N 79.948862W |
|||
* 40.446195, -79.948862 |
|||
Informally, specifying a geographic location usually means giving the location's [[latitude]] and [[longitude]]. The numerical values for latitude and longitude can occur in a number of different units or formats:<ref>{{cite web|title=Coordinate transformer|url=http://www.ordnancesurvey.co.uk/gps/transformation|publisher=Ordnance Survey Great Britain|access-date=4 March 2014|archive-date=12 August 2013|archive-url=https://web.archive.org/web/20130812112214/http://www.ordnancesurvey.co.uk/gps/transformation|url-status=live}}</ref> |
|||
==Basic Forms== |
|||
* [[sexagesimal degree]]: [[degree (angle)|degrees]], [[Minute of arc|minutes]], and [[Arcsecond|seconds]] : 40° 26′ 46″ N 79° 58′ 56″ W |
|||
There are three basic forms of a coordinate. |
|||
* degrees and decimal minutes: 40° 26.767′ N 79° 58.933′ W |
|||
* decimal degrees: +40.446 -79.982 |
|||
There are 60 minutes in a degree and 60 seconds in a minute. Therefore, to convert from a degrees minutes seconds format to a decimal degrees format, one may use the formula |
|||
# Coordinate containing degrees (integer), minutes (integer), and seconds (integer, or real number). |
|||
# Coordinate containing degrees (integer) and minutes (real number). |
|||
# Coordinate containing only degrees (real number). |
|||
: <math>\rm{decimal\ degrees} = \rm{degrees} + \frac{\rm{minutes}}{60} + \frac{\rm{seconds}}{3600}</math>. |
|||
All forms of coordinates are capable of representing the same amount of data and the same precision. Depending on which type of coordinate you are provided with, and which type you would like to work with, you may have to do some conversion. |
|||
To convert back from decimal degree format to degrees minutes seconds format, |
|||
==Components of a Typical Coordinate== |
|||
: <math> \begin{align} |
|||
In it's most simple form a coordinate is just a number of degrees. The tricky part comes in when you need to differentiate North/South latitude or West/East longitude, or make the number more digestable by writing it with minutes and seconds instead of as a decimal number. |
|||
\rm{absDegrees} & = | \rm{decimal\ degrees} | \\ |
|||
\rm{floorAbsDegrees} & = \lfloor \rm{absDegrees} \rfloor \\ |
|||
\rm{degrees} & = \sgn ( \rm{decimal\ degrees} ) \times \rm{floorAbsDegrees} \\ |
|||
\rm{minutes} & = \lfloor 60 \times (\rm{absDegrees} - \rm{floorAbsDegrees})\rfloor \\ |
|||
\rm{seconds} & = 3600 \times (\rm{absDegrees} - \rm{floorAbsDegrees}) - 60 \times \rm{minutes} \\ |
|||
\end{align} </math> |
|||
where <math>\rm{absDegrees}</math> and <math>\rm{floorAbsDegrees}</math> are just temporary variables to handle both positive and negative values properly. |
|||
==Coordinate system conversion== |
|||
===Degrees=== |
|||
A coordinate system conversion is a conversion from one coordinate system to another, with both coordinate systems based on the same geodetic datum. Common conversion tasks include conversion between geodetic and earth-centered, earth-fixed ([[ECEF]]) coordinates and conversion from one type of map projection to another. |
|||
=== From geodetic to ECEF coordinates === |
|||
The degrees portion of the coordinate is always going to be the easiest to figure out. The degrees is always the left-most whole number. For example: |
|||
[[Image:Geodetic latitude and the length of Normal.svg|thumb|The length PQ, called the ''prime vertical radius'', is <math>N(\phi)</math>. The length IQ is equal to <math>\, e^2 N(\phi) </math>. <math>R = (X,\, Y,\, Z)</math>.]] |
|||
[[Geodetic coordinates]] (latitude <math>\ \phi</math>, longitude <math>\ \lambda</math>, height <math>h</math>) can be converted into [[ECEF]] coordinates using the following equation:<ref name="gps-chap10">{{cite book|title=GPS - theory and practice|author1=B. Hofmann-Wellenhof |author2=H. Lichtenegger |author3=J. Collins |isbn=3-211-82839-7|page=282|others=Section 10.2.1|year=1997 }}</ref> |
|||
40:26:46N 40 |
|||
W87°43'41 87 |
|||
: <math>\begin{align} |
|||
A sphere is divided into 360 degrees. The number space is divided into two halves, East and West in the case of longitude and North and South in the case of latitude. The maximum ranges are as follows: |
|||
X & = \left( N(\phi) + h\right)\cos{\phi}\cos{\lambda} \\ |
|||
Y & = \left( N(\phi) + h\right)\cos{\phi}\sin{\lambda} \\ |
|||
Z & = \left( \frac{b^2}{a^2} N(\phi) + h\right)\sin{\phi} \\ |
|||
& = \left( (1 - e^2) N(\phi) + h\right)\sin{\phi} \\ |
|||
& = \left( (1 - f)^2 N(\phi) + h\right)\sin{\phi} |
|||
\end{align}</math> |
|||
where |
|||
Longitude |
|||
: <math> |
|||
180 W = -180 |
|||
N(\phi) = \frac{a^2}{\sqrt{a^2 \cos^2 \phi + b^2 \sin^2 \phi }} |
|||
180 E = 180 |
|||
= \frac{a}{\sqrt{1 - e^2\sin^2\phi}} = \frac{a}{\sqrt{1 - \frac{e^2}{1 + \cot^2 \phi}}}, |
|||
</math> |
|||
and <math>a</math> and <math>b</math> are the equatorial radius ([[semi-major axis]]) and the polar radius ([[semi-minor axis]]), respectively. <math>e^2 = 1 - \frac{b^2}{a^2}</math> is the square of the first numerical eccentricity of the ellipsoid. <math>f = 1 - \frac{b}{a}</math> is the flattening of the ellipsoid. The ''[[prime vertical radius of curvature]]'' <math>\, N(\phi) </math> is the distance from the surface to the Z-axis along the ellipsoid normal. |
|||
Latitude |
|||
90 N = 90 |
|||
90 S = -90 |
|||
====Properties==== |
|||
Technically you could have latitudes greater than 90 or less than -90, but this is an ambiguous case, since there would be an equivalent coordinate with an inverse longitude. |
|||
The following condition holds for the longitude in the same way as in the geocentric coordinates system: |
|||
:<math>\frac{X}{\cos\lambda} - \frac{Y}{\sin\lambda} = 0.</math> |
|||
And the following holds for the latitude: |
|||
The minimal case is that you have only degrees: |
|||
:<math>\frac{p}{\cos\phi} - \frac{Z}{\sin\phi} - e^2 N(\phi) = 0,</math> |
|||
where <math>p = \sqrt{X^2 + Y^2}</math>, as the parameter <math>h</math> is eliminated by subtracting |
|||
40.446111 or |
|||
:<math>\frac{p}{\cos\phi} = N + h</math> |
|||
40.446111N |
|||
and |
|||
===Minutes=== |
|||
:<math>\frac{Z}{\sin\phi} = \frac{b^2}{a^2}N + h.</math> |
|||
The following holds furthermore, derived from dividing above equations: |
|||
Minutes are an optional component, as is implied by the minimal case of degrees. If there is no minutes component, the degrees component contains the entire precision of the coordinate and there must not be a seconds component. Minutes are actually the numerator component of a fraction with denominator 60 of one degree. |
|||
:<math>\frac{Z}{p} \cot \phi = 1 - \frac{e^2 N}{N + h}.</math> |
|||
====Orthogonality==== |
|||
With the same examples as above: |
|||
The [[Orthogonal coordinates|orthogonality]] of the coordinates is confirmed via differentiation: |
|||
:<math>\begin{align} |
|||
\begin{pmatrix} dX \\ dY \\ dZ \end{pmatrix} &= |
|||
\begin{pmatrix} |
|||
-\sin\lambda & -\sin\phi \cos\lambda & \cos\phi \cos\lambda \\ |
|||
\cos\lambda & -\sin\phi \sin\lambda & \cos\phi \sin\lambda \\ |
|||
0 & \cos\phi & \sin\phi \\ |
|||
\end{pmatrix} |
|||
\begin{pmatrix} dE \\ dN \\ dU \end{pmatrix}, \\[3pt] |
|||
\begin{pmatrix} dE \\ dN \\ dU \end{pmatrix} &= |
|||
\begin{pmatrix} |
|||
\left(N(\phi) + h\right) \cos\phi & 0 & 0 \\ |
|||
0 & M(\phi) + h & 0 \\ |
|||
0 & 0 & 1 \\ |
|||
\end{pmatrix} |
|||
\begin{pmatrix} d\lambda \\ d\phi \\ dh \end{pmatrix}, |
|||
\end{align}</math> |
|||
<!-- |
|||
: <math>\begin{align} |
|||
& \big(dX,\, dY,\, dZ\big) \\[6pt] |
|||
= & \big(-\sin\phi \cos\lambda,\, -\sin\phi \sin\lambda,\, \cos\phi\big) \left(M(\phi) + h\right)\, d\phi \\[6pt] |
|||
&{}+ \big(-\sin\lambda,\, \cos\lambda,\, 0\big)\left(N(\phi) + h\right) \cos\phi\, d\lambda \\[6pt] |
|||
&{}+ \big(\cos\lambda \cos\phi,\, \cos\phi \sin\lambda,\, \sin\phi\big)\, dh, |
|||
\end{align}</math> |
|||
--> |
|||
where |
|||
:<math> |
|||
M(\phi) = \frac{a\left(1 - e^2\right)}{\left(1 - e^2 \sin^2 \phi\right)^\frac{3}{2}} = N(\phi) \frac{1 - e^2}{1 - e^2\sin^2\phi} |
|||
</math> |
|||
(see also "[[Meridian arc#Definition|Meridian arc on the ellipsoid]]"). |
|||
40:26:46N 26 |
|||
<!-- |
|||
W87°43'41 43 |
|||
The infinitesimal length caused by latitude and longitude is calculated as follows (see also "[[Meridian arc#Meridian distance on the ellipsoid|Meridian arc on the ellipsoid]]"): |
|||
: <math> |
|||
ds^2 = \left(\frac{a\left(1 - e^2\right)}{\left(1 - e^2 \sin^2\phi\right)^\frac{3}{2}} + h\right)^2 d\phi^2 + \left(\frac{a}{\sqrt{1 - e^2 \sin^2\phi}} + h\right)^2 \cos^2\phi\, d\lambda^2 . |
|||
</math> |
|||
--> |
|||
=== From ECEF to geodetic coordinates === |
|||
In the first case, the number of minutes is 26. |
|||
====Conversion for the longitude==== |
|||
The conversion of ECEF coordinates to longitude is: |
|||
: <math>\lambda = \operatorname{atan2}(Y,X)</math>. |
|||
where [[atan2]] is the quadrant-resolving arc-tangent function. |
|||
The geocentric longitude and geodetic longitude have the same value; this is true for Earth and other similar shaped planets because they have a large amount of rotational symmetry around their spin axis (see [[triaxial ellipsoidal longitude]] for a generalization). |
|||
==== Simple iterative conversion for latitude and height ==== |
|||
To convert, 26 minutes is equal to <math>\frac{26}{60} = 0.4\bar{3}</math> degrees. |
|||
The conversion for the latitude and height involves a circular relationship involving ''N'', which is a function of latitude: |
|||
:<math>\frac{Z}{p} \cot \phi = 1 - \frac{e^2 N}{N + h}</math>, |
|||
:<math>h=\frac{p}{\cos\phi} - N</math>. |
|||
It can be solved iteratively,<ref name=osgb>A guide to coordinate systems in Great Britain. This is available as a pdf document at |
|||
{{cite web|url=http://www.ordnancesurvey.co.uk/oswebsite/gps/information/coordinatesystemsinfo/guidecontents |title=ordnancesurvey.co.uk |access-date=2012-01-11 |url-status=dead |archive-url=https://web.archive.org/web/20120211075826/http://www.ordnancesurvey.co.uk/oswebsite/gps/information/coordinatesystemsinfo/guidecontents/ |archive-date=2012-02-11 }} Appendices B1, B2</ref><ref name=osborne>Osborne, P (2008). [http://mercator.myzen.co.uk/mercator.pdf The Mercator Projections] {{webarchive|url=https://web.archive.org/web/20120118224152/http://mercator.myzen.co.uk/mercator.pdf |date=2012-01-18 }} Section 5.4</ref> for example, starting with a first guess ''h''≈0 then updating ''N''. |
|||
More elaborate methods are shown below. |
|||
The procedure is, however, sensitive to small accuracy due to <math>N</math> and <math>h</math> being maybe 10{{sup|6}} apart.<ref>[https://web.archive.org/web/20080920155754/http://www.ferris.edu/faculty/burtchr/papers/cartesian_to_geodetic.pdf R. Burtch, A Comparison of Methods Used in Rectangular to Geodetic Coordinate Transformations.]</ref><ref>{{cite journal |last1=Featherstone |first1=W. E. |last2=Claessens |first2=S. J. |title=Closed-Form Transformation between Geodetic and Ellipsoidal Coordinates |journal=Stud. Geophys. Geod. |volume=52 |issue=1 |pages=1–18 |year=2008 |doi=10.1007/s11200-008-0002-6 |bibcode=2008StGG...52....1F |hdl=20.500.11937/11589 |s2cid=59401014 |hdl-access=free }}</ref> |
|||
<!-- There are several methods that solve the equation; two are shown. --> |
|||
==== Newton–Raphson method ==== |
|||
===Seconds=== |
|||
The following Bowring's irrational geodetic-latitude equation,<ref>{{cite journal |last=Bowring |first=B. R. |title=Transformation from Spatial to Geographical Coordinates |journal=Surv. Rev. |volume=23 |issue=181 |pages=323–327 |year=1976 |doi=10.1179/003962676791280626 }}</ref> derived simply from the above properties, is efficient to be solved by [[Newton–Raphson]] iteration method:<ref>{{cite journal |last=Fukushima |first=T. |title=Fast Transform from Geocentric to Geodetic Coordinates |journal=J. Geod. |volume=73 |issue=11 |pages=603–610 |year=1999 |doi=10.1007/s001900050271 |bibcode=1999JGeod..73..603F |s2cid=121816294 }} (Appendix B)</ref><ref>{{cite book|first1=J. J. |title=Proceedings of the IEEE 1997 National Aerospace and Electronics Conference. NAECON 1997|volume=2|pages=646–650|last1=Sudano|doi=10.1109/NAECON.1997.622711|chapter=An exact conversion from an earth-centered coordinate system to latitude, longitude and altitude|year=1997|isbn=0-7803-3725-5|s2cid=111028929 }}</ref> |
|||
: <math>\kappa - 1 - \frac{e^2 a\kappa}{\sqrt{p^2 + \left(1 - e^2\right) Z^2 \kappa^2}} = 0,</math> |
|||
where <math>\kappa = \frac{p}{Z} \tan \phi</math> and <math>p = \sqrt{X^2 + Y^2}</math> as before. The height is calculated as: |
|||
Seconds are also an optional component, and can only exist if the minutes component also exists. Seconds are the numerator component of a fraction with denominator 60 of one minute. |
|||
: <math>\begin{align} |
|||
h &= e^{-2} \left(\kappa^{-1} - {\kappa_0}^{-1}\right) \sqrt{p^2 + Z^2 \kappa^2}, \\ |
|||
\kappa_0 &\triangleq \left(1 - e^2\right)^{-1}. |
|||
\end{align}</math> |
|||
The iteration can be transformed into the following calculation: |
|||
40:26:46N 46 |
|||
: <math>\kappa_{i+1} = \frac{c_i + \left(1 - e^2\right) Z^2 \kappa_i^3}{c_i - p^2} = 1 + \frac{p^2 + \left(1 - e^2\right) Z^2 \kappa_i^3}{c_i - p^2},</math> |
|||
W87°43'41 41 |
|||
where <math>c_i = \frac{\left(p^2 + \left(1 - e^2\right) Z^2 \kappa_i ^2\right)^\frac{3}{2}}{ae^2} .</math> |
|||
In the second case, the number of minutes is 41. |
|||
The constant <math>\,\kappa_0</math> is a good starter value for the iteration when <math>h \approx 0</math>. Bowring showed that the single iteration produces a sufficiently accurate solution. He used extra trigonometric functions in his original formulation. |
|||
To convert, 41 seconds is equal to <math>\frac{41}{60} = 0.68\bar{3}</math> minutes. |
|||
<!-- |
|||
: <math>\kappa \approx \kappa_1 = \left(c + \frac{z^2}{1 - e^2 }\right)/\left(c - \left(1 - e^2\right)\left(x^2 + y^2\right)\right),</math> |
|||
where |
|||
: <math>c = \frac{\left(\left(1 - e^2\right)\left(x^2 + y^2\right) + z^2\right)^\frac{3}{2}}{ae^2 \sqrt{1 - e^2}}.</math> --><!-- |
|||
For <math>h = 0</math>, <math>\kappa = \frac{1}{1 - e^2}</math>, which is a good starter for the iteration. Bowring showed that the single iteration produces the sufficiently accurate solution under the condition of <math>h \approx 0</math>. |
|||
--> |
|||
==== Ferrari's solution ==== |
|||
==Putting it all Together== |
|||
The quartic equation of <math>\kappa</math>, derived from the above, <!--for this transformation--> can be solved by [[Quartic equation#Ferrari.27s solution|Ferrari's solution]]<ref>{{cite journal|first1=H. |last1=Vermeille, H.|title=Direct Transformation from Geocentric to Geodetic Coordinates|journal= J. Geod.|volume=76|number=8|pages=451–454 |
|||
|year= 2002|doi=10.1007/s00190-002-0273-6|s2cid=120075409 }}</ref><ref>{{cite journal|first1=Laureano|last1=Gonzalez-Vega|first2=Irene|last2=PoloBlanco|title=A symbolic analysis of Vermeille and Borkowski polynomials for transforming 3D Cartesian to geodetic coordinates|journal=J. Geod.|volume=83|number=11|pages=1071–1081|doi=10.1007/s00190-009-0325-2|year=2009|bibcode=2009JGeod..83.1071G |s2cid=120864969 }}</ref> to yield: |
|||
: <math> |
|||
\begin{align} |
|||
\zeta &= \left(1 - e^2\right)\frac{z^2}{a^2} ,\\[4pt] |
|||
\rho &= \frac{1}{6}\left(\frac{p^2}{a^2} + \zeta - e^4\right) ,\\[4pt] |
|||
s &= \frac{e^4 \zeta p^2}{4\rho^3 a^2} ,\\[4pt] |
|||
t &= \sqrt[3]{1 + s + \sqrt{s(s + 2)}} ,\\[4pt] |
|||
u &= \rho \left(t + 1 + \frac{1}{t}\right) ,\\[4pt] |
|||
v &= \sqrt{u^2 + e^4 \zeta} ,\\[4pt] |
|||
w &= e^2 \frac{u + v - \zeta}{2v} ,\\[4pt] |
|||
\kappa &= 1 + e^2 \frac{\sqrt{u + v + w^2} + w}{u + v}. |
|||
\end{align} |
|||
</math> |
|||
===== The application of Ferrari's solution ===== |
|||
===Conversion from DMS to Decimal=== |
|||
A number of techniques and algorithms are available but the most accurate, according to Zhu,<ref>{{cite journal|first1=J.|last1=Zhu|title=Conversion of Earth-centered Earth-fixed coordinates to geodetic coordinates|journal=IEEE Transactions on Aerospace and Electronic Systems|volume=30|issue=3|year=1994|pages=957–961|doi=10.1109/7.303772|bibcode=1994ITAES..30..957Z }}</ref> is the following procedure established by Heikkinen,<ref>{{cite journal|first1=M.|last1=Heikkinen|title=Geschlossene formeln zur berechnung räumlicher geodätischer koordinaten aus rechtwinkligen koordinaten.|journal=Z. Vermess.|volume=107|year=1982|pages=207–211|language=de}}</ref> as cited by Zhu. This overlaps with above. It is assumed that geodetic parameters <math>\{a,\, b,\, e\}</math> are known |
|||
: <math>\begin{align} |
|||
Given a DMS coordinate such as W87°43'41", it's trivial to convert it to a number of decimal degrees using the following method: |
|||
a &= 6378137.0 \text{ m. Earth Equatorial Radius} \\[3pt] |
|||
b &= 6356752.3142 \text{ m. Earth Polar Radius} \\[3pt] |
|||
e^2 &= \frac{a^2-b^2}{a^2} \\[3pt] |
|||
e'^2 &= \frac{a^2 - b^2}{b^2} \\[3pt] |
|||
p &= \sqrt{X^2 + Y^2} \\[3pt] |
|||
F &= 54b^2 Z^2 \\[3pt] |
|||
G &= p^2 + \left(1 - e^2\right)Z^2 - e^2\left(a^2 - b^2\right) \\[3pt] |
|||
c &= \frac{e^4 Fp^2}{G^3} \\[3pt] |
|||
s &= \sqrt[3]{1 + c + \sqrt{c^2 + 2c}} \\[3pt] |
|||
k &= s + 1 + \frac{1}{s}\\[3pt] |
|||
P &= \frac{F}{3 k^2 G^2} \\[3pt] |
|||
Q &= \sqrt{1 + 2e^4 P} \\[3pt] |
|||
r_0 &= \frac{-Pe^2 p}{1 + Q} + \sqrt{\frac{1}{2} a^2\left(1 + \frac{1}{Q}\right) - \frac{P\left(1 - e^2\right)Z^2}{Q(1 + Q)} - \frac{1}{2}Pp^2} \\[3pt] |
|||
U &= \sqrt{\left(p - e^2 r_0\right)^2 + Z^2} \\[3pt] |
|||
V &= \sqrt{\left(p - e^2 r_0\right)^2 + \left(1 - e^2\right)Z^2} \\[3pt] |
|||
z_0 &= \frac{b^2 Z}{aV} \\[3pt] |
|||
h &= U\left(1 - \frac{b^2}{aV}\right) \\[3pt] |
|||
\phi &= \arctan\left[\frac{Z + e'^2 z_0}{p}\right] \\[3pt] |
|||
\lambda &= \operatorname{arctan2}[Y,\, X] |
|||
\end{align}</math> |
|||
Note: [[atan2|arctan2]][Y, X] is the four-quadrant inverse tangent function. |
|||
* Starting with the seconds first, divide 41/60 = ~0.683333 minutes. |
|||
* Add fractional minutes to whole minutes, 43 + 0.683333 = 43.683333 minutes. |
|||
* Divide minutes: 43.683333 / 60 = ~0.728055 degrees. |
|||
* Add fractional degrees to whole degrees to produce final result: 87 + 0.728055 = 87.728055 degrees. |
|||
* Since it is a West longitude coordinate, negate the result. |
|||
* The final result is '''-87.728055'''. |
|||
=== |
==== Power series ==== |
||
For small {{math|e<sup>2</sup>}} the power series |
|||
:<math>\kappa = \sum_{i\ge 0} \alpha_i e^{2i}</math> |
|||
starts with |
|||
Given a decimal longitudinal coordinate such as -87.728055 it is trivial to convert it to DMS form. It will be necessary to know whether it is a latitudinal or longitudinal coordinate in order to fully convert it. The method is as follows: |
|||
:<math>\begin{align} |
|||
\alpha_0 &= 1; \\ |
|||
\alpha_1 &= \frac{a}{\sqrt{Z^2 + p^2}}; \\ |
|||
\alpha_2 &= \frac{aZ^2\sqrt{Z^2 + p^2} + 2a^2 p^2}{2\left(Z^2 + p^2\right)^2}. |
|||
\end{align}</math> |
|||
=== Geodetic to/from ENU coordinates === |
|||
* Subtract the whole number portion of the coordinate, leaving the fractional part. The whole number is the number of degrees. 87.728055 = 87 degrees. |
|||
To convert from geodetic coordinates to [[local tangent plane]] ([[Axes conventions#Ground reference frames: ENU and NED|ENU]]) coordinates is a two-stage process: |
|||
* Multiply the remaining fractional part by 60. This will produce a number of minutes in the whole number portion. 0.728055 x 60 = 43.6833 = 43 minutes. |
|||
* Multiply the fractional part of the number of minutes by 60, producing a number of seconds. 0.6833 x 60 = 40.998 = 41 seconds. It is possible count this as 40 seconds, truncating the decimal, round it to 41, or keep the entire number. |
|||
* Depending on whether the source number was a latitudinal or longitudinal coordinate, and the sign of the number, add the N/S/E/W specifier. The following table shows the possibilities: |
|||
# Convert geodetic coordinates to ECEF coordinates |
|||
Type Dir. Sign Test |
|||
# Convert ECEF coordinates to local ENU coordinates |
|||
Lat. N + > 0 |
|||
Lat. S - < 0 |
|||
Long. E + > 0 |
|||
Long. W - < 0 |
|||
==== From ECEF to ENU ==== |
|||
A coordinate with at 0°0'0" latitude or longitude is neither North nor South, East nor West. It is simply zero latitude or zero longitude. |
|||
To transform from ECEF coordinates to the local coordinates we need a local reference point. Typically, this might be the location of a radar. If a radar is located at <math>\left\{X_r,\, Y_r,\, Z_r\right\}</math> and an aircraft at <math>\left\{X_p,\, Y_p,\, Z_p\right\}</math>, then the vector pointing from the radar to the aircraft in the ENU frame is |
|||
* The final result is: W 87°43'41". |
|||
: <math> |
|||
====Programmatical Conversion==== |
|||
\begin{bmatrix}x \\ y \\ z\end{bmatrix} = |
|||
\begin{bmatrix} |
|||
-\sin\lambda_r & \cos\lambda_r & 0 \\ |
|||
-\sin\phi_r\cos\lambda_r & -\sin\phi_r\sin\lambda_r & \cos\phi_r \\ |
|||
\cos\phi_r\cos\lambda_r & \cos\phi_r\sin\lambda_r & \sin\phi_r |
|||
\end{bmatrix} |
|||
\begin{bmatrix} |
|||
X_p - X_r \\ |
|||
Y_p - Y_r \\ |
|||
Z_p - Z_r |
|||
\end{bmatrix} |
|||
</math> |
|||
Note: <math>\ \phi</math> is the ''[[geodetic latitude]]''; the ''[[geocentric latitude]]'' is inappropriate for representing [[vertical direction]] for the local tangent plane and must be [[geocentric latitude|converted]] if necessary. |
|||
The most common programmatical use of these processes is to display a coordinate to an end user in the more common DMS form instead of decimal form. Some example code in the [[PHP]] programming language to do this is: |
|||
==== From ENU to ECEF ==== |
|||
function pretty_coord($coord) { |
|||
return sprintf("%0.0f° %2.3f", |
|||
floor(abs($coord)), |
|||
60*(abs($coord)-floor(abs($coord)))); |
|||
}; |
|||
This is just the inversion of the ECEF to ENU transformation so |
|||
function pretty_coords($latitude, $longitude) { |
|||
return sprintf("%s %s, %s %s", |
|||
: <math> |
|||
($latitude>0)?"N":"S", pretty_coord($latitude), |
|||
\begin{bmatrix}X_p \\ Y_p \\ Z_p\end{bmatrix} = |
|||
($longitude>0)?"E":"W", pretty_coord($longitude)); |
|||
\begin{bmatrix} |
|||
}; |
|||
-\sin\lambda_r & -\sin\phi_r\cos\lambda_r & \cos\phi_r\cos\lambda_r \\ |
|||
\cos\lambda_r & -\sin\phi_r\sin\lambda_r & \cos\phi_r\sin\lambda_r \\ |
|||
0 & \cos\phi_r & \sin\phi_r |
|||
\end{bmatrix} |
|||
\begin{bmatrix}x \\ y \\ z\end{bmatrix} + |
|||
\begin{bmatrix}X_r \\ Y_r \\ Z_r\end{bmatrix} |
|||
</math> |
|||
=== Conversion across map projections === |
|||
Conversion of coordinates and map positions among different map projections reference to the same datum may be accomplished either through direct translation formulas from one projection to another, or by first converting from a projection <math>A</math> to an intermediate coordinate system, such as ECEF, then converting from ECEF to projection <math>B</math>. The formulas involved can be complex and in some cases, such as in the ECEF to geodetic conversion above, the conversion has no closed-form solution and approximate methods must be used. References such as the ''DMA Technical Manual 8358.1''<ref name=TM8358.2>{{cite web|title=TM8358.2: The Universal Grids: Universal Transverse Mercator (UTM) and Universal Polar Stereographic (UPS)|url=http://earth-info.nga.mil/GandG/publications/tm8358.2/TM8358_2.pdf|publisher=National Geospatial-Intelligence Agency|access-date=4 March 2014|archive-date=3 March 2020|archive-url=https://web.archive.org/web/20200303184711/https://earth-info.nga.mil/GandG/publications/tm8358.2/TM8358_2.pdf|url-status=live}}</ref> and the USGS paper ''Map Projections: A Working Manual''<ref name=Snyder1987>{{cite book|last=Snyder|first=John P.|title=Map Projections: A Working Manual|year=1987|publisher=USGS Professional Paper: 1395|url=https://pubs.er.usgs.gov/publication/pp1395|access-date=2017-08-28|archive-date=2011-05-17|archive-url=https://web.archive.org/web/20110517082057/http://pubs.er.usgs.gov/publication/pp1395|url-status=live}}</ref> contain formulas for conversion of map projections. It is common to use computer programs to perform coordinate conversion tasks, such as with the DoD and NGA supported GEOTRANS program.<ref name=GEOTRANS_NGA>{{cite web|title=MSP GEOTRANS 3.3 (Geographic Translator)|url=http://earth-info.nga.mil/GandG/geotrans/|publisher=NGA: Coordinate Systems Analysis Branch|access-date=4 March 2014|archive-date=15 March 2014|archive-url=https://web.archive.org/web/20140315075748/http://earth-info.nga.mil/GandG/geotrans/|url-status=live}}</ref> |
|||
== Datum transformations == |
|||
{{further|Geodetic datum}} |
|||
[[File:Possible paths for datum transform.svg|400px|right|alt=coordinate transform paths|The different possible paths for transforming geographic coordinates from datum <math>A</math> to datum <math>B</math>]] |
|||
Transformations among datums can be accomplished in a number of ways. There are transformations that directly convert geodetic coordinates from one datum to another. There are more indirect transforms that convert from geodetic coordinates to ECEF coordinates, transform the ECEF coordinates from one datum to another, then transform ECEF coordinates of the new datum back to geodetic coordinates. There are also grid-based transformations that directly transform from one (datum, map projection) pair to another (datum, map projection) pair. |
|||
=== Helmert transformation === |
|||
{{main|Helmert transformation}} |
|||
Use of the Helmert transform in the transformation from geodetic coordinates of datum <math>A</math> to geodetic coordinates of datum <math>B</math> occurs in the context of a three-step process:<ref name=HelmertNZ>{{cite web|title=Equations Used for Datum Transformations|url=http://www.linz.govt.nz/geodetic/conversion-coordinates/geodetic-datum-conversion/datum-transformation-equations/index.aspx|publisher=Land Information New Zealand (LINZ)|access-date=5 March 2014|archive-date=6 March 2014|archive-url=https://web.archive.org/web/20140306005832/http://www.linz.govt.nz/geodetic/conversion-coordinates/geodetic-datum-conversion/datum-transformation-equations/index.aspx|url-status=live}}</ref> |
|||
# Convert from geodetic coordinates to ECEF coordinates for datum <math>A</math> |
|||
# Apply the Helmert transform, with the appropriate <math>A\to B</math> transform parameters, to transform from datum <math>A</math> ECEF coordinates to datum <math>B</math> ECEF coordinates |
|||
# Convert from ECEF coordinates to geodetic coordinates for datum <math>B</math> |
|||
In terms of ECEF XYZ vectors, the Helmert transform has the form (position vector transformation convention and very small rotation angles simplification)<ref name=HelmertNZ/> |
|||
: <math> |
|||
\begin{bmatrix} X_B \\ Y_B \\ Z_B \end{bmatrix} = |
|||
\begin{bmatrix} c_x \\ c_y \\ c_z \end{bmatrix} + \left(1 + s \times 10^{-6}\right) |
|||
\begin{bmatrix} |
|||
1 & -r_z & r_y \\ |
|||
r_z & 1 & -r_x \\ |
|||
-r_y & r_x & 1 |
|||
\end{bmatrix} \begin{bmatrix} X_A \\ Y_A \\ Z_A \end{bmatrix}. |
|||
</math> |
|||
The Helmert transform is a seven-parameter transform with three translation (shift) parameters <math>c_x,\, c_y,\, c_z</math>, three rotation parameters <math>r_x,\, r_y,\, r_z</math> and one scaling (dilation) parameter <math>s</math>. The Helmert transform is an approximate method that is accurate when the transform parameters are small relative to the magnitudes of the ECEF vectors. Under these conditions, the transform is considered reversible.<ref name=OGP7_2>{{cite web|title=Geomatics Guidance Note Number 7, part 2 Coordinate Conversions and Transformations including Formulas|url=http://info.ogp.org.uk/geodesy/guides/docs/G7-2.pdf|publisher=International Association of Oil and Gas Producers (OGP)|access-date=5 March 2014|url-status=dead|archive-url=https://web.archive.org/web/20140306005736/http://info.ogp.org.uk/geodesy/guides/docs/G7-2.pdf|archive-date=6 March 2014}}</ref> |
|||
A fourteen-parameter Helmert transform, with linear time dependence for each parameter,{{r|OGP7_2|page1=131-133}} can be used to capture the time evolution of geographic coordinates dues to [[geomorphic]] processes, such as continental drift<ref name=Bolstad>{{cite book|last=Bolstad|first=Paul|title=GIS Fundamentals, 4th Edition|year=2012 |publisher=Atlas books|isbn=978-0-9717647-3-6|page=93|url=http://www.paulbolstad.net/4thedition/samplechaps/GISFundChap3.pdf|url-status=dead|archive-url=https://web.archive.org/web/20160202201558/http://www.paulbolstad.net/4thedition/samplechaps/GISFundChap3.pdf|archive-date=2016-02-02}}</ref> and earthquakes.<ref name=addend_8350_2>{{cite web|title=Addendum to NIMA TR 8350.2: Implementation of the World Geodetic System 1984 (WGS 84) Reference Frame G1150|url=http://gis-lab.info/docs/nima-tr8350.2-addendum.pdf|publisher=National Geospatial-Intelligence Agency|access-date=6 March 2014|archive-date=11 May 2012|archive-url=https://web.archive.org/web/20120511090551/http://gis-lab.info/docs/nima-tr8350.2-addendum.pdf|url-status=live}}</ref> This has been incorporated into software, such as the Horizontal Time Dependent Positioning (HTDP) tool from the U.S. NGS.<ref name=HTDP>{{cite web|title=HTDP - Horizontal Time-Dependent Positioning|url=https://www.ngs.noaa.gov/TOOLS/Htdp/Htdp.shtml|publisher=U.S. National Geodetic Survey (NGS)|access-date=5 March 2014|archive-date=25 November 2019|archive-url=https://web.archive.org/web/20191125025630/https://www.ngs.noaa.gov/TOOLS/Htdp/Htdp.shtml|url-status=live}}</ref> |
|||
=== Molodensky-Badekas transformation === |
|||
To eliminate the coupling between the rotations and translations of the Helmert transform, three additional parameters can be introduced to give a new XYZ center of rotation closer to coordinates being transformed. This ten-parameter model is called the ''Molodensky-Badekas transformation'' and should not be confused with the more basic Molodensky transform.{{r|OGP7_2|page1=133-134}} |
|||
Like the Helmert transform, using the Molodensky-Badekas transform is a three-step process: |
|||
# Convert from geodetic coordinates to ECEF coordinates for datum <math>A</math> |
|||
# Apply the Molodensky-Badekas transform, with the appropriate <math>A\to B</math> transform parameters, to transform from datum <math>A</math> ECEF coordinates to datum <math>B</math> ECEF coordinates |
|||
# Convert from ECEF coordinates to geodetic coordinates for datum <math>B</math> |
|||
The transform has the form<ref name=MB_NGA>{{cite web|title=Molodensky-Badekas (7+3) Transformations|url=http://earth-info.nga.mil/GandG/coordsys/datums/molodensky.html|publisher=National Geospatial Intelligence Agency (NGA)|access-date=5 March 2014|archive-date=19 July 2013|archive-url=https://web.archive.org/web/20130719151529/http://earth-info.nga.mil/GandG/coordsys/datums/molodensky.html|url-status=live}}</ref> |
|||
: <math> |
|||
\begin{bmatrix} X_B \\ Y_B \\ Z_B \end{bmatrix} = |
|||
\begin{bmatrix} X_A \\ Y_A \\ Z_A \end{bmatrix} + |
|||
\begin{bmatrix} \Delta X_A \\ \Delta Y_A \\ \Delta Z_A \end{bmatrix} + |
|||
\begin{bmatrix} |
|||
1 & -r_z & r_y \\ |
|||
r_z & 1 & -r_x \\ |
|||
-r_y & r_x & 1 |
|||
\end{bmatrix} |
|||
\begin{bmatrix} X_A - X^0_A \\ Y_A - Y^0_A \\ Z_A - Z^0_A \end{bmatrix} + |
|||
\Delta S \begin{bmatrix} X_A - X^0_A \\ Y_A - Y^0_A \\ Z_A - Z^0_A \end{bmatrix}. |
|||
</math> |
|||
where <math>\left(X^0_A,\, Y^0_A,\, Z^0_A\right)</math> is the origin for the rotation and scaling transforms and <math>\Delta S</math> is the scaling factor. |
|||
The Molodensky-Badekas transform is used to transform local geodetic datums to a global geodetic datum, such as WGS 84. Unlike the Helmert transform, the Molodensky-Badekas transform is not reversible due to the rotational origin being associated with the original datum.{{r|OGP7_2|page1=134}} |
|||
=== Molodensky transformation === |
|||
The Molodensky transformation converts directly between geodetic coordinate systems of different datums without the intermediate step of converting to geocentric coordinates (ECEF).<ref name=esri_eq_based>{{cite web|title=ArcGIS Help 10.1: Equation-based methods|url=http://resources.arcgis.com/en/help/main/10.1/index.html#//003r00000012000000|publisher=ESRI|access-date=5 March 2014|archive-date=4 December 2019|archive-url=https://web.archive.org/web/20191204151744/http://resources.arcgis.com/en/help/main/10.1/index.html#//003r00000012000000|url-status=live}}</ref> It requires the three shifts between the datum centers and the differences between the reference ellipsoid semi-major axes and flattening parameters. |
|||
The Molodensky transform is used by the [[National Geospatial-Intelligence Agency]] (NGA) in their standard TR8350.2 and the NGA supported GEOTRANS program.<ref name=NGA_Datum>{{cite web|title=Datum Transformations|url=http://earth-info.nga.mil/GandG/coordsys/datums/index.html|publisher=National Geospatial-Intelligence Agency|access-date=5 March 2014|archive-date=9 October 2014|archive-url=https://web.archive.org/web/20141009125117/http://earth-info.nga.mil/GandG/coordsys/datums/index.html|url-status=live}}</ref> The Molodensky method was popular before the advent of modern computers and the method is part of many geodetic programs. |
|||
=== Grid-based method === |
|||
[[File:Datum Shift Between NAD27 and NAD83.png|thumb|Magnitude of shift in position between NAD27 and NAD83 datum as a function of location.]] |
|||
Grid-based transformations directly convert map coordinates from one (map-projection, geodetic datum) pair to map coordinates of another (map-projection, geodetic datum) pair. An example is the NADCON method for transforming from the North American Datum (NAD) 1927 to the NAD 1983 datum.<ref name=ESRI_grid>{{cite web|title=ArcGIS Help 10.1: Grid-based methods|url=http://resources.arcgis.com/en/help/main/10.1/index.html#//003r00000013000000|publisher=ESRI|access-date=5 March 2014|archive-date=4 December 2019|archive-url=https://web.archive.org/web/20191204151744/http://resources.arcgis.com/en/help/main/10.1/index.html#//003r00000013000000|url-status=live}}</ref> The High Accuracy Reference Network (HARN), a high accuracy version of the NADCON transforms, have an accuracy of approximately 5 centimeters. The National Transformation version 2 ([[NTv2]]) is a Canadian version of NADCON for transforming between NAD 1927 and NAD 1983. HARNs are also known as NAD 83/91 and High Precision Grid Networks (HPGN).<ref name=nadcon_harn>{{cite web|title=NADCON/HARN Datum ShiftMethod|url=http://www.bluemarblegeo.com/knowledgebase/geocalc/classdef/datumshift/datumshifts/nadcon.html|publisher=bluemarblegeo.com|access-date=5 March 2014|archive-date=6 March 2014|archive-url=https://web.archive.org/web/20140306000427/http://www.bluemarblegeo.com/knowledgebase/geocalc/classdef/datumshift/datumshifts/nadcon.html|url-status=live}}</ref> Subsequently, Australia and New Zealand adopted the NTv2 format to create grid-based methods for transforming among their own local datums. |
|||
Like the multiple regression equation transform, grid-based methods use a low-order interpolation method for converting map coordinates, but in two dimensions instead of three. The [[NOAA]] provides a software tool (as part of the NGS Geodetic Toolkit) for performing NADCON transformations.<ref name=NOAA_NADCON>{{cite web|title=NADCON - Version 4.2|url=http://www.ngs.noaa.gov/PC_PROD/NADCON/|publisher=NOAA|access-date=5 March 2014|archive-date=6 May 2021|archive-url=https://web.archive.org/web/20210506162736/https://www.ngs.noaa.gov/PC_PROD/NADCON/|url-status=live}}</ref><ref name=Mulcare>{{cite web|last=Mulcare |first=Donald M. |title=NGS Toolkit, Part 8: The National Geodetic Survey NADCON Tool |url=http://www.profsurv.com/magazine/article.aspx?i=1193 |publisher=Professional Surveyor Magazine |access-date=5 March 2014 |url-status=dead |archive-url=https://web.archive.org/web/20140306001134/http://www.profsurv.com/magazine/article.aspx?i=1193 |archive-date=6 March 2014 }}</ref> |
|||
=== Multiple regression equations === |
|||
Datum transformations through the use of empirical [[multiple regression]] methods were created to achieve higher accuracy results over small geographic regions than the standard Molodensky transformations. MRE transforms are used to transform local datums over continent-sized or smaller regions to global datums, such as WGS 84.<ref name=IHO>{{cite report |title=User's Handbook on Datum Transformations Involving WGS 84 |date=August 2008 |edition=3rd |series=Special Publication No. 60 |publisher=International Hydrographic Bureau |location=Monaco |url=https://www.iho.int/iho_pubs/standard/S60_Ed3Eng.pdf |access-date=2017-01-10 |archive-date=2016-04-12 |archive-url=https://web.archive.org/web/20160412230130/http://www.iho.int/iho_pubs/standard/S60_Ed3Eng.pdf |url-status=live }}</ref> The standard NIMA TM 8350.2, Appendix D,<ref name=tr8350_2>{{cite web|title=DEPARTMENT OF DEFENSE WORLD GEODETIC SYSTEM 1984 Its Definition and Relationships with Local Geodetic Systems|url=http://earth-info.nga.mil/GandG/publications/tr8350.2/wgs84fin.pdf|publisher=National Imagery and Mapping Agency (NIMA)|access-date=5 March 2014|archive-date=11 April 2014|archive-url=https://web.archive.org/web/20140411101805/http://earth-info.nga.mil/GandG/publications/tr8350.2/wgs84fin.pdf|url-status=live}}</ref> lists MRE transforms from several local datums to WGS 84, with accuracies of about 2 meters.<ref name=taylor_high>{{cite web|last=Taylor|first=Chuck|title=High-Accuracy Datum Transformations|url=http://home.hiwaay.net/~taylorc/bookshelf/math-science/geodesy/datum/transform/high-accuracy/|access-date=5 March 2014|archive-date=4 January 2013|archive-url=https://web.archive.org/web/20130104235158/http://home.hiwaay.net/~taylorc/bookshelf/math-science/geodesy/datum/transform/high-accuracy/|url-status=live}}</ref> |
|||
The MREs are a direct transformation of geodetic coordinates with no intermediate ECEF step. Geodetic coordinates <math>\phi_B,\, \lambda_B,\, h_B</math> in the new datum <math>B</math> are modeled as [[polynomial]]s of up to the ninth degree in the geodetic coordinates <math>\phi_A,\, \lambda_A,\, h_A</math> of the original datum <math>A</math>. For instance, the change in <math>\phi_B</math> could be parameterized as (with only up to quadratic terms shown){{r|IHO|page1=9}} |
|||
:<math>\Delta \phi = a_0 + a_1 U + a_2 V + a_3 U^2 + a_4 UV + a_5 V^2 + \cdots</math> |
|||
where |
|||
: <math>a_i,</math> parameters fitted by multiple regression |
|||
: <math>\begin{align} |
|||
U &= K(\phi_A - \phi_m) \\ |
|||
V &= K(\lambda_A - \lambda_m) \\ |
|||
\end{align}</math> |
|||
: <math>K,</math> scale factor |
|||
: <math>\phi_m,\, \lambda_m,</math> origin of the datum, <math>A.</math> |
|||
with similar equations for <math> \Delta\lambda</math> and <math>\Delta h</math>. Given a sufficient number of <math>(A,\, B)</math> coordinate pairs for landmarks in both datums for good statistics, multiple regression methods are used to fit the parameters of these polynomials. The polynomials, along with the fitted coefficients, form the multiple regression equations. |
|||
== See also== |
|||
* [[Gauss–Krüger coordinate system]] |
|||
* [[List of map projections]] |
|||
* [[Spatial reference system]] |
|||
* [[Topocentric coordinate system]] |
|||
* [[Universal polar stereographic coordinate system]] |
|||
* [[Universal Transverse Mercator coordinate system]] |
|||
* [[Geographical distance]] |
|||
==References== |
|||
{{reflist|30em}} |
|||
[[Category:Geographic coordinate systems|*Conversion]] |
|||
[[Category:Geodesy]] |
Latest revision as of 08:18, 10 August 2024
In geodesy, conversion among different geographic coordinate systems is made necessary by the different geographic coordinate systems in use across the world and over time. Coordinate conversion is composed of a number of different types of conversion: format change of geographic coordinates, conversion of coordinate systems, or transformation to different geodetic datums. Geographic coordinate conversion has applications in cartography, surveying, navigation and geographic information systems.
In geodesy, geographic coordinate conversion is defined as translation among different coordinate formats or map projections all referenced to the same geodetic datum.[1] A geographic coordinate transformation is a translation among different geodetic datums. Both geographic coordinate conversion and transformation will be considered in this article.
This article assumes readers are already familiar with the content in the articles geographic coordinate system and geodetic datum.
Change of units and format
[edit]Informally, specifying a geographic location usually means giving the location's latitude and longitude. The numerical values for latitude and longitude can occur in a number of different units or formats:[2]
- sexagesimal degree: degrees, minutes, and seconds : 40° 26′ 46″ N 79° 58′ 56″ W
- degrees and decimal minutes: 40° 26.767′ N 79° 58.933′ W
- decimal degrees: +40.446 -79.982
There are 60 minutes in a degree and 60 seconds in a minute. Therefore, to convert from a degrees minutes seconds format to a decimal degrees format, one may use the formula
- .
To convert back from decimal degree format to degrees minutes seconds format,
where and are just temporary variables to handle both positive and negative values properly.
Coordinate system conversion
[edit]A coordinate system conversion is a conversion from one coordinate system to another, with both coordinate systems based on the same geodetic datum. Common conversion tasks include conversion between geodetic and earth-centered, earth-fixed (ECEF) coordinates and conversion from one type of map projection to another.
From geodetic to ECEF coordinates
[edit]Geodetic coordinates (latitude , longitude , height ) can be converted into ECEF coordinates using the following equation:[3]
where
and and are the equatorial radius (semi-major axis) and the polar radius (semi-minor axis), respectively. is the square of the first numerical eccentricity of the ellipsoid. is the flattening of the ellipsoid. The prime vertical radius of curvature is the distance from the surface to the Z-axis along the ellipsoid normal.
Properties
[edit]The following condition holds for the longitude in the same way as in the geocentric coordinates system:
And the following holds for the latitude:
where , as the parameter is eliminated by subtracting
and
The following holds furthermore, derived from dividing above equations:
Orthogonality
[edit]The orthogonality of the coordinates is confirmed via differentiation:
where
(see also "Meridian arc on the ellipsoid").
From ECEF to geodetic coordinates
[edit]Conversion for the longitude
[edit]The conversion of ECEF coordinates to longitude is:
- .
where atan2 is the quadrant-resolving arc-tangent function. The geocentric longitude and geodetic longitude have the same value; this is true for Earth and other similar shaped planets because they have a large amount of rotational symmetry around their spin axis (see triaxial ellipsoidal longitude for a generalization).
Simple iterative conversion for latitude and height
[edit]The conversion for the latitude and height involves a circular relationship involving N, which is a function of latitude:
- ,
- .
It can be solved iteratively,[4][5] for example, starting with a first guess h≈0 then updating N. More elaborate methods are shown below. The procedure is, however, sensitive to small accuracy due to and being maybe 106 apart.[6][7]
Newton–Raphson method
[edit]The following Bowring's irrational geodetic-latitude equation,[8] derived simply from the above properties, is efficient to be solved by Newton–Raphson iteration method:[9][10]
where and as before. The height is calculated as:
The iteration can be transformed into the following calculation:
where
The constant is a good starter value for the iteration when . Bowring showed that the single iteration produces a sufficiently accurate solution. He used extra trigonometric functions in his original formulation.
Ferrari's solution
[edit]The quartic equation of , derived from the above, can be solved by Ferrari's solution[11][12] to yield:
The application of Ferrari's solution
[edit]A number of techniques and algorithms are available but the most accurate, according to Zhu,[13] is the following procedure established by Heikkinen,[14] as cited by Zhu. This overlaps with above. It is assumed that geodetic parameters are known
Note: arctan2[Y, X] is the four-quadrant inverse tangent function.
Power series
[edit]For small e2 the power series
starts with
Geodetic to/from ENU coordinates
[edit]To convert from geodetic coordinates to local tangent plane (ENU) coordinates is a two-stage process:
- Convert geodetic coordinates to ECEF coordinates
- Convert ECEF coordinates to local ENU coordinates
From ECEF to ENU
[edit]To transform from ECEF coordinates to the local coordinates we need a local reference point. Typically, this might be the location of a radar. If a radar is located at and an aircraft at , then the vector pointing from the radar to the aircraft in the ENU frame is
Note: is the geodetic latitude; the geocentric latitude is inappropriate for representing vertical direction for the local tangent plane and must be converted if necessary.
From ENU to ECEF
[edit]This is just the inversion of the ECEF to ENU transformation so
Conversion across map projections
[edit]Conversion of coordinates and map positions among different map projections reference to the same datum may be accomplished either through direct translation formulas from one projection to another, or by first converting from a projection to an intermediate coordinate system, such as ECEF, then converting from ECEF to projection . The formulas involved can be complex and in some cases, such as in the ECEF to geodetic conversion above, the conversion has no closed-form solution and approximate methods must be used. References such as the DMA Technical Manual 8358.1[15] and the USGS paper Map Projections: A Working Manual[16] contain formulas for conversion of map projections. It is common to use computer programs to perform coordinate conversion tasks, such as with the DoD and NGA supported GEOTRANS program.[17]
Datum transformations
[edit]Transformations among datums can be accomplished in a number of ways. There are transformations that directly convert geodetic coordinates from one datum to another. There are more indirect transforms that convert from geodetic coordinates to ECEF coordinates, transform the ECEF coordinates from one datum to another, then transform ECEF coordinates of the new datum back to geodetic coordinates. There are also grid-based transformations that directly transform from one (datum, map projection) pair to another (datum, map projection) pair.
Helmert transformation
[edit]Use of the Helmert transform in the transformation from geodetic coordinates of datum to geodetic coordinates of datum occurs in the context of a three-step process:[18]
- Convert from geodetic coordinates to ECEF coordinates for datum
- Apply the Helmert transform, with the appropriate transform parameters, to transform from datum ECEF coordinates to datum ECEF coordinates
- Convert from ECEF coordinates to geodetic coordinates for datum
In terms of ECEF XYZ vectors, the Helmert transform has the form (position vector transformation convention and very small rotation angles simplification)[18]
The Helmert transform is a seven-parameter transform with three translation (shift) parameters , three rotation parameters and one scaling (dilation) parameter . The Helmert transform is an approximate method that is accurate when the transform parameters are small relative to the magnitudes of the ECEF vectors. Under these conditions, the transform is considered reversible.[19]
A fourteen-parameter Helmert transform, with linear time dependence for each parameter,[19]: 131-133 can be used to capture the time evolution of geographic coordinates dues to geomorphic processes, such as continental drift[20] and earthquakes.[21] This has been incorporated into software, such as the Horizontal Time Dependent Positioning (HTDP) tool from the U.S. NGS.[22]
Molodensky-Badekas transformation
[edit]To eliminate the coupling between the rotations and translations of the Helmert transform, three additional parameters can be introduced to give a new XYZ center of rotation closer to coordinates being transformed. This ten-parameter model is called the Molodensky-Badekas transformation and should not be confused with the more basic Molodensky transform.[19]: 133-134
Like the Helmert transform, using the Molodensky-Badekas transform is a three-step process:
- Convert from geodetic coordinates to ECEF coordinates for datum
- Apply the Molodensky-Badekas transform, with the appropriate transform parameters, to transform from datum ECEF coordinates to datum ECEF coordinates
- Convert from ECEF coordinates to geodetic coordinates for datum
The transform has the form[23]
where is the origin for the rotation and scaling transforms and is the scaling factor.
The Molodensky-Badekas transform is used to transform local geodetic datums to a global geodetic datum, such as WGS 84. Unlike the Helmert transform, the Molodensky-Badekas transform is not reversible due to the rotational origin being associated with the original datum.[19]: 134
Molodensky transformation
[edit]The Molodensky transformation converts directly between geodetic coordinate systems of different datums without the intermediate step of converting to geocentric coordinates (ECEF).[24] It requires the three shifts between the datum centers and the differences between the reference ellipsoid semi-major axes and flattening parameters.
The Molodensky transform is used by the National Geospatial-Intelligence Agency (NGA) in their standard TR8350.2 and the NGA supported GEOTRANS program.[25] The Molodensky method was popular before the advent of modern computers and the method is part of many geodetic programs.
Grid-based method
[edit]Grid-based transformations directly convert map coordinates from one (map-projection, geodetic datum) pair to map coordinates of another (map-projection, geodetic datum) pair. An example is the NADCON method for transforming from the North American Datum (NAD) 1927 to the NAD 1983 datum.[26] The High Accuracy Reference Network (HARN), a high accuracy version of the NADCON transforms, have an accuracy of approximately 5 centimeters. The National Transformation version 2 (NTv2) is a Canadian version of NADCON for transforming between NAD 1927 and NAD 1983. HARNs are also known as NAD 83/91 and High Precision Grid Networks (HPGN).[27] Subsequently, Australia and New Zealand adopted the NTv2 format to create grid-based methods for transforming among their own local datums.
Like the multiple regression equation transform, grid-based methods use a low-order interpolation method for converting map coordinates, but in two dimensions instead of three. The NOAA provides a software tool (as part of the NGS Geodetic Toolkit) for performing NADCON transformations.[28][29]
Multiple regression equations
[edit]Datum transformations through the use of empirical multiple regression methods were created to achieve higher accuracy results over small geographic regions than the standard Molodensky transformations. MRE transforms are used to transform local datums over continent-sized or smaller regions to global datums, such as WGS 84.[30] The standard NIMA TM 8350.2, Appendix D,[31] lists MRE transforms from several local datums to WGS 84, with accuracies of about 2 meters.[32]
The MREs are a direct transformation of geodetic coordinates with no intermediate ECEF step. Geodetic coordinates in the new datum are modeled as polynomials of up to the ninth degree in the geodetic coordinates of the original datum . For instance, the change in could be parameterized as (with only up to quadratic terms shown)[30]: 9
where
- parameters fitted by multiple regression
- scale factor
- origin of the datum,
with similar equations for and . Given a sufficient number of coordinate pairs for landmarks in both datums for good statistics, multiple regression methods are used to fit the parameters of these polynomials. The polynomials, along with the fitted coefficients, form the multiple regression equations.
See also
[edit]- Gauss–Krüger coordinate system
- List of map projections
- Spatial reference system
- Topocentric coordinate system
- Universal polar stereographic coordinate system
- Universal Transverse Mercator coordinate system
- Geographical distance
References
[edit]- ^ Roger Foster; Dan Mullaney. "Basic Geodesy Article 018: Conversions and Transformations" (PDF). National Geospatial Intelligence Agency. Archived (PDF) from the original on 27 November 2020. Retrieved 4 March 2014.
- ^ "Coordinate transformer". Ordnance Survey Great Britain. Archived from the original on 12 August 2013. Retrieved 4 March 2014.
- ^ B. Hofmann-Wellenhof; H. Lichtenegger; J. Collins (1997). GPS - theory and practice. Section 10.2.1. p. 282. ISBN 3-211-82839-7.
- ^ A guide to coordinate systems in Great Britain. This is available as a pdf document at "ordnancesurvey.co.uk". Archived from the original on 2012-02-11. Retrieved 2012-01-11. Appendices B1, B2
- ^ Osborne, P (2008). The Mercator Projections Archived 2012-01-18 at the Wayback Machine Section 5.4
- ^ R. Burtch, A Comparison of Methods Used in Rectangular to Geodetic Coordinate Transformations.
- ^ Featherstone, W. E.; Claessens, S. J. (2008). "Closed-Form Transformation between Geodetic and Ellipsoidal Coordinates". Stud. Geophys. Geod. 52 (1): 1–18. Bibcode:2008StGG...52....1F. doi:10.1007/s11200-008-0002-6. hdl:20.500.11937/11589. S2CID 59401014.
- ^ Bowring, B. R. (1976). "Transformation from Spatial to Geographical Coordinates". Surv. Rev. 23 (181): 323–327. doi:10.1179/003962676791280626.
- ^ Fukushima, T. (1999). "Fast Transform from Geocentric to Geodetic Coordinates". J. Geod. 73 (11): 603–610. Bibcode:1999JGeod..73..603F. doi:10.1007/s001900050271. S2CID 121816294. (Appendix B)
- ^ Sudano, J. J. (1997). "An exact conversion from an earth-centered coordinate system to latitude, longitude and altitude". Proceedings of the IEEE 1997 National Aerospace and Electronics Conference. NAECON 1997. Vol. 2. pp. 646–650. doi:10.1109/NAECON.1997.622711. ISBN 0-7803-3725-5. S2CID 111028929.
- ^ Vermeille, H., H. (2002). "Direct Transformation from Geocentric to Geodetic Coordinates". J. Geod. 76 (8): 451–454. doi:10.1007/s00190-002-0273-6. S2CID 120075409.
- ^ Gonzalez-Vega, Laureano; PoloBlanco, Irene (2009). "A symbolic analysis of Vermeille and Borkowski polynomials for transforming 3D Cartesian to geodetic coordinates". J. Geod. 83 (11): 1071–1081. Bibcode:2009JGeod..83.1071G. doi:10.1007/s00190-009-0325-2. S2CID 120864969.
- ^ Zhu, J. (1994). "Conversion of Earth-centered Earth-fixed coordinates to geodetic coordinates". IEEE Transactions on Aerospace and Electronic Systems. 30 (3): 957–961. Bibcode:1994ITAES..30..957Z. doi:10.1109/7.303772.
- ^ Heikkinen, M. (1982). "Geschlossene formeln zur berechnung räumlicher geodätischer koordinaten aus rechtwinkligen koordinaten". Z. Vermess. (in German). 107: 207–211.
- ^ "TM8358.2: The Universal Grids: Universal Transverse Mercator (UTM) and Universal Polar Stereographic (UPS)" (PDF). National Geospatial-Intelligence Agency. Archived (PDF) from the original on 3 March 2020. Retrieved 4 March 2014.
- ^ Snyder, John P. (1987). Map Projections: A Working Manual. USGS Professional Paper: 1395. Archived from the original on 2011-05-17. Retrieved 2017-08-28.
- ^ "MSP GEOTRANS 3.3 (Geographic Translator)". NGA: Coordinate Systems Analysis Branch. Archived from the original on 15 March 2014. Retrieved 4 March 2014.
- ^ a b "Equations Used for Datum Transformations". Land Information New Zealand (LINZ). Archived from the original on 6 March 2014. Retrieved 5 March 2014.
- ^ a b c d "Geomatics Guidance Note Number 7, part 2 Coordinate Conversions and Transformations including Formulas" (PDF). International Association of Oil and Gas Producers (OGP). Archived from the original (PDF) on 6 March 2014. Retrieved 5 March 2014.
- ^ Bolstad, Paul (2012). GIS Fundamentals, 4th Edition (PDF). Atlas books. p. 93. ISBN 978-0-9717647-3-6. Archived from the original (PDF) on 2016-02-02.
- ^ "Addendum to NIMA TR 8350.2: Implementation of the World Geodetic System 1984 (WGS 84) Reference Frame G1150" (PDF). National Geospatial-Intelligence Agency. Archived (PDF) from the original on 11 May 2012. Retrieved 6 March 2014.
- ^ "HTDP - Horizontal Time-Dependent Positioning". U.S. National Geodetic Survey (NGS). Archived from the original on 25 November 2019. Retrieved 5 March 2014.
- ^ "Molodensky-Badekas (7+3) Transformations". National Geospatial Intelligence Agency (NGA). Archived from the original on 19 July 2013. Retrieved 5 March 2014.
- ^ "ArcGIS Help 10.1: Equation-based methods". ESRI. Archived from the original on 4 December 2019. Retrieved 5 March 2014.
- ^ "Datum Transformations". National Geospatial-Intelligence Agency. Archived from the original on 9 October 2014. Retrieved 5 March 2014.
- ^ "ArcGIS Help 10.1: Grid-based methods". ESRI. Archived from the original on 4 December 2019. Retrieved 5 March 2014.
- ^ "NADCON/HARN Datum ShiftMethod". bluemarblegeo.com. Archived from the original on 6 March 2014. Retrieved 5 March 2014.
- ^ "NADCON - Version 4.2". NOAA. Archived from the original on 6 May 2021. Retrieved 5 March 2014.
- ^ Mulcare, Donald M. "NGS Toolkit, Part 8: The National Geodetic Survey NADCON Tool". Professional Surveyor Magazine. Archived from the original on 6 March 2014. Retrieved 5 March 2014.
- ^ a b User's Handbook on Datum Transformations Involving WGS 84 (PDF) (Report). Special Publication No. 60 (3rd ed.). Monaco: International Hydrographic Bureau. August 2008. Archived (PDF) from the original on 2016-04-12. Retrieved 2017-01-10.
- ^ "DEPARTMENT OF DEFENSE WORLD GEODETIC SYSTEM 1984 Its Definition and Relationships with Local Geodetic Systems" (PDF). National Imagery and Mapping Agency (NIMA). Archived (PDF) from the original on 11 April 2014. Retrieved 5 March 2014.
- ^ Taylor, Chuck. "High-Accuracy Datum Transformations". Archived from the original on 4 January 2013. Retrieved 5 March 2014.