<<

A General Formula for Calculating and its Application to Coordinate Conversion in the Gauss-Krüger Projection 1

A General Formula for Calculating Length and its Application to Coordinate Conversion in the Gauss-Krüger Projection

Kazushige KAWASE

Abstract

The meridian arc length from the to arbitrary is of utmost importance in map projection, particularly in the Gauss-Krüger projection. In Japan, the previously used formula for the meridian arc length was a power series with respect to the first eccentricity squared of the , despite the fact that a more concise expansion using the third of the has been derived. One of the reasons that this more concise formula has rarely been recognized in Japan is that its derivation is difficult to understand. This paper shows an explicit derivation of a general formula in the form of a power series with respect to the third flattening of the earth ellipsoid. Since the derived formula is suitable for implementation as a computer program, it has been applied to the calculation of coordinate conversion in the Gauss-Krüger projection for trial.

1. Introduction cannot be expressed explicitly using a combination of As is well known in , the meridian arc elementary functions. As a rule, we evaluate this elliptic length S on the earth ellipsoid from the equator to integral as an approximate expression by first expanding the geographic latitude  is given by the integrand in a binomial series with respect to e2 , regarding e as a small quantity, then readjusting with a  a1 e2  trigonometric function, and finally carrying out termwise S  d , (1)  2 2 3 2 0 1 e sin  integration. The following example is an approximation of where a and e are the semi-major axis and the first formula (1) obtained by truncating the expansion at order eccentricity of the earth ellipsoid, respectively. e10 : Since formula (1) includes an , it

2  sin 2 sin 4 sin 6 sin8 sin10  S  a1 e C1  C2  C3  C4  C5  C6  ,  2 4 6 8 10 

3 2 45 4 175 6 11025 8 43659 10 C1 1 e  e  e  e  e , 4 64 256 16384 65536 (2) 3 15 525 2205 72765 15 105 2205 10395 C  e2  e4  e6  e8  e10 , C  e4  e6  e8  e10 , 2 4 16 512 2048 65536 3 64 256 4096 16384 35 315 31185 315 3465 693 C  e6  e8  e10 , C  e8  e10 , C  e10. 4 512 2048 131072 5 16384 65536 6 131072

Since the above expression has fractional Despite this fact, formula (2) has long been used coefficients too complicated for most readers, except for generally in Japan to calculate the meridian arc length of those specialized in the given field, to memorize at a the earth ellipsoid. glance, users face a perpetual risk of making mistakes owing to errors in typing the fractional coefficients.

2 Bulletin of the Geospatial Information Authority of Japan, Vol.59 December, 2011

2. Other expressions expressed in formula (3) as 2.1 Bessel’s formula On the other hand, an alternative derivation using  a1 n2 1 n S  d , (4)  0 2 3 2 yet another quantity n , the third flattening of the earth 1 2ncos2  n ellipsoid defined as expanded the denominator of the integrand in a series

1 1 e2 e2 with respect to n , and then carried out termwise n   , (3) 1 1 e2 4 integration. The following formula is a summary of the has been presented by Bessel (Bessel, 1837). expansion result that appeared in Bessel’s original paper: Bessel rewrote formula (1) using the relation

S  a 1 n 2 1 n 

 9 2 225 4  3  15 3 175 5  15  2 7 4  35  3 27 5    1 n  n   n  n  n sin 2  n  n sin 4  n  n sin 6 .  4 64  2  8 64  16  4  48  16   (5)

2 The main advantages of this formula over an equivalent value 1 n2  1 n . Helmert then formula (2) are its good convergence, since n is about multiplied the terms in the curly brackets in formula (5) 2 a quarter of the value of e2 , and the reduced number of by 1 n2  , the numerator of the substituted value, terms appearing in the formula despite its almost equal aiming to extract the factor 1 1 n and simplify the precision. fractional coefficients appearing in formula (5) (Helmert, 1880). 2.2 Helmert’s formula More than thirty years after that, Krüger About forty years after the publication of Bessel’s summarized Helmert’s result in his paper published in result, Helmert derived a simpler expression by replacing 1912 (Krüger, 1912) as the following formula: the 1 n 2 1 n factor appearing in formula (5) with

a  n2 n4  3  n3  15  n4  35 315  S   1    n  sin 2  n2  sin 4  n3 sin 6  n4 sin8 .         (6) 1 n  4 64  2  8  16  4  48 512 

As formula (6) shows, the result derived by (1880) seems to be not only difficult to understand but Helmert has a simpler and more concise expression than also hard to generalize. does formula (2), which was truncated at order e10 , and has almost the same or greater precision despite its 3. Derivation of general formula truncation to no more than order n4 (corresponds to In order to generalize formula (6), we choose e8 ), as reported by Tobita et al. (Tobita et al., 2009). another approach that does not start from formula (4) Nevertheless, the derivation process used by Helmert directly. First, in accordance with a well-known result

A General Formula for Calculating Meridian Arc Length and its Application to Coordinate Conversion in the Gauss-Krüger Projection 3 regarding elliptic integrals and elliptic functions (e.g.,   2   2 2 e sin 2  Byrd et al., 1954), we find that the integral in formula (1) S  a 1 e sin  d   . (7)  0 2 1 e2 sin 2   can be regarded as a special case of incomplete elliptic   integrals of the third kind. Thus, it can be divided into an incomplete elliptic integral of the second kind and a term Bearing the relation expressed in formula (3) in of elementary functions as* mind and letting 2  , it is not hard to see that we can rewrite formula (7) as

a  1 2 2nsin 2  S   1 2ncos  n2 d   . (8) 1 n  2  0 2   1 2ncos2  n 

At a glance, the result of formula (8) appears to term in the parentheses in formula (8) (we denote this be a favorable transformation, since the factor a 1 n, term S1 ) can be regarded as a generating function of 1 2 which also appears in formula (6), appears spontaneously. Gegenbauer polynomials Ci cos (e.g.,

Now, we can begin to examine formula (8) in order to Abramowitz et al., 1965), we can expand S1 in a power generalize Helmert’s result. series with respect to n and rearrange all the terms as First, since the integrand appearing in the first

*Since we could find no references describing the derivation of this result in detail, a simple proof is given in the appendix. 4 Bulletin of the Geospatial Information Authority of Japan, Vol.59 December, 2011

2 1 2 S1  1 2ncos  n d 2  0 2  1 i 1 2   n Ci cos d  0  2 i0 1 2  i k 1 2 i  k 1 2   n i cosi  2k  d  0   2 2 i0 k0 k!i  k ! 1 2 2  n2 j 2 j k 1 2 2 j  k 1 2  cos2 j  2k  d  0   2 j0 2 k0 k!2 j  k !1 2 2 j1 2  n2 j1 k 1 2 2 j 1 k 1 2  cos2 j 1 2k  d  0   2 j0 2 k0 k!2 j 1 k ! 1 2 j 2 2 jk 2   j1 k  2 j 1  3   3   3   n  1   cos2 j  2k  1  1  d   0  2  2r  2r 2s j0  r1   k0 r1   s1    j k 2 j1k 2  3   3   n2 j1 cos2 j 1 2k  1  1  d  0   2r 2s j0 k0 r1   s1    j 2 j jk jk 2 1  3n   3n   3n      n  cos2k   n   n d  0  2  2r  2r 2s j0  r1   k1 r11  s    j1 jk1 jk 2  3n   3n   cos2k 1   n   n d  0  2r 2s j0 k1 r11  s     j j jk jk j1 jk1 jk   2 sin 4k sin4k  2               r  2k  r  s  2k 1 r s j0  r1 k1 r1 s1 k1 r11s    j 2 j jl1 2 jl 2   2 sin 2l          k l r s j0  k1 l 1 r1 s1  2  j 2 j l    m     sin 2l 1  (9)      m  .  k   l  j1 m 2 j0  k1   l1 m1 

In formula (9), i  3n 2i  n , x denotes function. From the above result, for the time being we the Gamma function, and x denotes the floor rewrite formula (8) as

2    j   2 j l   a     sin 2l 1 m  2nsin 2  S      m   . (10)   k   j1 m 2  1 n    l  1 2ncos2  n2  j0  k1   l1 m1  

Next, we turn to the second term in the d2S d2  1 2  1  1 2ncos  n2 d 2 2   parentheses (we denote this term S2 ) in formula (8). d d  2  0 

First, we take the following favorable relation between 2nsin 2    S2 . (11) 1 2ncos2  n2 S1 and S2 into account:

A General Formula for Calculating Meridian Arc Length and its Application to Coordinate Conversion in the Gauss-Krüger Projection 5

On the other hand, as we have already seen the form to that of S1 , i.e., final result of formula (9), it is easy to understand that

2 2  S1 can be represented as a trigonometric expansion that d S d   S  1      sin 2l  2 2 2  0  l  has the form d d  l1 

   4l 2 sin 2l . (13)   l l1 S1  0  l sin 2l . (12) l1

Combining S1 and S2 , we finally arrive at a general Bering the relation of formula (11) in mind, we formula for calculating the meridian arc length from the find that S2 can be represented with a very similar equator to an arbitrary geographic latitude,

2   j   2 j l  a a    1  1 m  S  S  S       4l sin 2l  m  1 n 1 2 1 n  k   l  j1 m 2 j0  k1   l1   m1  2 m  j  2 j l 1  a   3n   1   3n       n     4l sin 2l   n . (14) 1 n   2k   l  m  j0  k1   l1   m1 2 j  21 m 2     

Truncating the summation with respect to index the fact that the denominator of the integrand in formula j in formula (14) at j  2 , we can confirm that this (4) can be regarded as a generating function of 3 2 formula yields Helmert’s result summarized in formula Gegenbauer polynomials Ci cos 2 . In this case,

(6). just replacing i  3n 2i  n in formula (9) with

Note that we can derive another general formula i  n 2i  n by analogy with the expansion with 1 2 1 2 for S without dividing terms as in formula (8) using Ci cos   Ci cos 2  , we have

2 1 m   j   2 j l  2    n   sin 2l   n   S  a 1 n 1 n     n     n . (15)   2k   l  m  j0  k1   l1 m1 2 j  2 1 m 2     

Although formula (15) is a little less effective cancelation of the redundant factor in front of the with respect to convergence at obtaining the meridian arc summation sign during the calculation. That is, the length itself, it might be better than formula (14) when it rectifying latitude  is given by comes to calculating the rectifying latitude, because of

2 m  j 2 j l 1   n  sin 2l   n     n   n   2k  l  m S j0  k1   l1 m1 2 j  2 1 m 2            s  . (16) 2  2S 2  j   n     n   2k j0  k1  

6 Bulletin of the Geospatial Information Authority of Japan, Vol.59 December, 2011

For practical purposes in the next section, we order of the quantity n using no iteration methods. As have defined the function x  sx at the end of formula we shall see below, all we have to do is to boot wxMaxima, (16). which is a document-based interface for the computer algebra system Maxima (Maxima.sourceforge.net, 2011), 4. Application to coordinate conversion in the and input six command lines. Gauss-Krüger projection We start from the following formula describing 4.1 Current status of coordinate conversion in the the relation between geographic latitude  and Gauss-Krüger projection conformal latitude  : Recently, formulae for direct projection to the Gauss-Krüger coordinate system using the third 2 n  2 n  gd1  gd1  tanh1 sin . flattening of the earth ellipsoid were implemented by   (17) 1 n 1 n  Karney (Karney, 2011). In this paper, almost all formulae for coordinate conversion between geographic and plane rectangular coordinates in the Gauss-Krüger projection Here, gd 1x denotes the inverse function of the are described as series expansions with respect to the third Gudermannian function gd x defined as flattening of the earth ellipsoid.

x x However, for simplicity of evaluation and dt 1 dt gd x  , gd x  . (18) inversion, Newton’s method, which belongs to a class of  0 cosht  0 cost iteration methods, was adopted instead of series expansions such as those given by Engsager and Poder Now, we introduce a function g and variables u and (Engsager et al., 2007) for the transformation between v , which temporarily replace the function and variables geographic latitude and conformal latitude. Although the in formula (17) as details of the Engsager and Poder implementations are alleged to be available on the Internet (as mentioned in u  gd1 , v  gd1 , the original paper), they are still difficult (or impossible) 2 n  2 n  (19) g u  g gd1  tanh1 sin  .     to access and follow. On the other hand, it is also true that 1 n 1 n  adopting the simpler iteration method and sacrificing calculation efficiency might lead to inconsistent It follows from formula (19) that we can rewrite uniformity of the evaluation because of intermixing of formula (17) as u  v  gu . From this equation, by iteration and truncation round-off errors. applying the Lagrange inversion theorem (Lagrange, 1770; Weisstein, 2011) with respect to the Gudermannian 4.2 Applying the general formula to the Gauss-Krüger function, we can obtain the expression projection Bearing the above discussion of the current status  1  k1 gd u  gd v  gv k gd v . (20)  k1  in mind, we now consider applying the general formula k1 k! v for meridian arc length derived in the previous section to coordinate conversion in the Gauss-Krüger projection. Using the well-known characteristic of the The goal of this paper is an explicit and self-contained Gudermannian function shown in formula (18), it is not presentation of series expansion coefficients to the 10th hard to see that

A General Formula for Calculating Meridian Arc Length and its Application to Coordinate Conversion in the Gauss-Krüger Projection 7

d 1 1  d   gdv     cos  ,    cos  . dv dv d gd1 v dv   d d It follows from the above relations and formula and (19) that we can rewrite formula (20) with the original variables as

k  k1    1    2 n 1 2 n        cos   tanh sin   cos  . (21) k!   1 n 1 n   k1    

With the help of powerful commands included in side of formula (24) corresponds to the rectifying latitude wxMaxima, we can obtain a readjusted trigonometric  , we can confirm that the equations that represent the expansion of formula (21) that has the form relation between  and the conformal latitude  are expressed in the form      k sin 2k . (22)   k1     k sin 2k , (25) k1 In addition, it is not hard to obtain the inverse equation in the form and, as its inverse equation,

        k sin 2k    h . (23)     k sin 2k . (26) k1 k1

From the equation     h derived in Beginning on the next page, we show a series of formula (23), by applying the Lagrange inversion screen captures (from Fig. 1 to Fig. 3) describing the theorem with respect to the function x  sx defined in calculation of the expansion coefficients  k ,  k , k , formula (16), we have and k appearing in formulas (22), (23), (25), and (26), respectively, to the 10th order of n . The coefficients

 k 1 1  k and k use the same notation as those that   s    s   h k 1 s  .  k1  k1 k!  appeared in Karney (2011). We note that it is sufficient to (24) truncate the summation with respect to index j in s( p) (corresponds to (%i2) in Fig. 1) at j  5 in order According to formula (16), since the left-hand to cover the coefficients to the 10th order.

8 Bulletin of the Geospatial Information Authority of Japan, Vol.59 December, 2011

Fig. 1 Screen capture of calculation using wxMaxima (1/3)

A General Formula for Calculating Meridian Arc Length and its Application to Coordinate Conversion in the Gauss-Krüger Projection 9

Fig. 2 Screen capture of calculation using wxMaxima (2/3)

10 Bulletin of the Geospatial Information Authority of Japan, Vol.59 December, 2011

Fig. 3 Screen capture of calculation using wxMaxima (3/3)

It is easy to see from these figures that the carry out all the calculations. This implies that Maxima coefficients  k (corresponds to (%o3) in Fig. 1) and is a powerful tool even for amateur users such as the

 k (corresponds to (%o4) in Fig. 2) coincide with G2k author. and e2k appearing in Engsager et al. (2007) to the 7th order, respectively. Likewise, we can also confirm that 5. Concluding remarks the coefficients k (corresponds to (%o5) in Fig. 2) A general formula for the calculation of the and k (corresponds to (%o6) in Fig. 3) completely meridian arc length has been presented. The derived coincide with those appearing on the Web site formula is very concise and suitable for implementation (http://geographiclib.sourceforge.net/html/transversemer as a computer program, as well, due to its simple cator.html#tmseries) presented by Karney. expression and easy handling. Although the command (%i3) has redundant The derived formula has also been applied to a expressions (to a large extent due to the author’s poor core part of the calculation for coordinate conversion in knowledge of wxMaxima) and there is still plenty of the Gauss-Krüger projection. For the readers’ immediate room for improvement, it does not take much time (less use, a practical example of the calculation using than 20 seconds on a 2.93 GHz Intel® processor) to wxMaxima has also been displayed. This confirmed that

A General Formula for Calculating Meridian Arc Length and its Application to Coordinate Conversion in the Gauss-Krüger Projection 11 an advantage of the explicit general formula is its easy doc (accessed 15 Jun. 2011). implementation on the computer algebra system Helmert, F. R. (1880): Die mathematischen und Maxima. physikalischen Theorieen der höheren Geodäsie, Einleitung und 1 Teil, Druck und Verlag von B. G. Acknowledgement Teubner, Leipzig, 44–48, The author would like to thank Dr. Hiroshi http://books.google.com/books?id=0l0OAAAAYA Masaharu and Dr. Mikio Tobita of the Geospatial AJ&pg=PA44#v=onepage&q&f=false (accessed 15 Information Authority of Japan for helpful suggestions Jun. 2011). and discussion. Karney, C. F. F. (2011): Transverse Mercator with an accuracy of a few nanometers, Journal of Geodesy, References 85(8), 475–485, doi: 10.1007/s00190-011-0445-3, Abramowitz, M. and Stegun, I. A., eds. (1964): Preprint: http://arxiv.org/abs/1002.1417v3 (accessed 2 Handbook of Mathematical Functions with Formulas, Mar. 2011). Graphs, and Mathematical Tables, Dover, New York, Krüger, L. (1912): Konforme Abbildung des Chapter 22, Erdellipsoids in der Ebene, Veröffentlichung Königlich http://people.math.sfu.ca/~cbm/aands/page_771.htm Preuszischen geodätischen Institutes, Neue Folge, 52, (accessed 15 Jun. 2011). Druck und Verlag von B. G. Teubner, Potsdam, 12, Bessel, F. W. (1837): Bestimmung der Axen des doi: 10.2312/GFZ.b103-krueger28. elliptischen Rotationssphäroids, welches den Lagrange, J. L. (1770): Nouvelle méthode pour résoudre vorhandenen Messungen von Meridianbögen der les équations littérales par le moyen des series, Erde am meisten entspricht, Astronomische Mémoires de l'Académie Royale des Sciences et Nachrichten, 14, 333–346, Belles-Lettres de Berlin, 24, 251–326, in Œuvres de http://books.google.com/books?id=wN0zAQAAIA Lagrange, 3 (Gauthier-Villars, Paris, 1869), pp. 5–73, AJ&pg=PA338#v=onepage&q&f=false (accessed http://books.google.com/books?id=YywPAAAAIAAJ 15 Jun. 2011). &pg=PA5#v=onepage&q&f=false (accessed 2 Mar. Byrd, P. F. and Friedman, M. D. (1954): Handbook of 2011). elliptic integrals for engineers and physicists, Die Maxima.sourceforge.net (2011): Maxima, a Computer Grundlehren der mathematischen Wissenschaften in Algebra System, Version 5.23.2, Einzeldarstellungen mit besonderer Berücksichtigung http://maxima.sourceforge.net/ (accessed 1 Mar. der Anwendungsgebiete, 67, Springer-Verlag, 2011). Berlin/Göttingen/Heidelberg, 236. Tobita, M., Kawase, K. and Masaharu, H. (2009): Engsager, K. E. and Poder, K. (2007): A highly accurate Comparison of equations for meridional distance from world wide algorithm for the transverse Mercator the equator, Journal of the Geodetic Society of Japan, mapping (almost), in Proc. XXIII Intl. Cartographic 55(3), 315–324 (in Japanese with English abstract). Conf. (ICC2007), Moscow, p. 2.1.2, Weisstein, E. W. (2011): "Lagrange Inversion Theorem." http://icaci.org/documents/ICC_proceedings/ICC2007/ From MathWorld--A Wolfram Web Resource, documents/doc/THEME%202/oral%201/2.1.2%20A% http://mathworld.wolfram.com/LagrangeInversionThe 20HIGHLY%20ACCURATE%20WORLD%20WIDE orem.html (accessed 1 Mar. 2011). %20ALGORITHM%20FOR%20THE%20TRANSVE.

12 Bulletin of the Geospatial Information Authority of Japan, Vol.59 December, 2011

APPENDIX: A simple proof of the relation between formulas (1) and (7) First, after performing integration by parts and then inserting terms that cancel each other, we have

  cos2  sin 2   e2 sin 2  cos2  d     d  0 2 2  2 2   0 2 2 3 2 1 e sin  2 1 e sin  0 1 e sin  sin 2  cos2   e2 sin 2  cos2   cos2    d  d  d 2 2  0 2 2 3 2  0 2 2 3 2  0 2 2 3 2 2 1 e sin  1 e sin  1 e sin  1 e sin  sin 2  cos2   cos2    d  d. 2 2  2 2  2 2 3 2 2 1 e sin  0 1 e sin  0 1 e sin 

Bearing the relation cos2  cos2   sin2  in mind, we obtain

 cos2   sin 2  sin 2 d  d   2 2 3 2  2 2 2 2 0 1 e sin  0 1 e sin  2 1 e sin  1  1 1 e2 sin 2  sin 2  d  2 e  0 1 e2 sin 2  2 1 e2 sin 2 

1   d   sin 2    1 e2 sin 2  d   2   2 2   2 2 e  0 1 e sin  0  2 1 e sin  F,e  E ,e sin 2   , 2 e 2 1 e2 sin 2 

where F,e and E,e denote the first and the second kind of incomplete elliptic integral, respectively. On the other hand, it follows from the definition of F,e that

 d F,e   0 1 e2 sin 2   d  sin 2    e2 d  0 2 2 3 2  0 2 2 3 2 1 e sin  1 e sin 

 d  1 cos2    e2 d  0 2 2 3 2  0 2 2 3 2 1 e sin  1 e sin   d  cos2   1 e2  e2 d.  2 2 3 2  2 2 3 2 0 1 e sin  0 1 e sin 

Rearranging the above results, we arrive at the final conclusion as

A General Formula for Calculating Meridian Arc Length and its Application to Coordinate Conversion in the Gauss-Krüger Projection 13

 1 e2  cos2  d  F,e  e2 d  2 2 3 2  2 2 3 2 0 1 e sin  0 1 e sin  e2 sin 2  E,e  2 1 e2 sin 2   e2 sin 2  1 e2 sin 2  d  .  0 2 1 e2 sin 2 