EPSG

EPSG guidance note #7-2, http://www.epsg.org

2018-08-29

Note: These formulas have been transcribed from EPSG Guidance Note #7-2. Users are encouraged to use that document rather than the text which follows as reference because limitations in the transcription will be avoided. The formulas to convert geodetic latitude and longitude (lat, lon) to Easting and Northing are: W = FE – (rho . sin T) S = FN – (a . mO / sin(latO) – rho . cos T) where m = cos(lat) / (1 – e^2sin^2(lat))^0.5 with lat in radians and mO for latO, the latitude of the origin, derived in the same way. M = a[(1 – e^2/4 – 3e^4/64 – 5e^6/256 –....)lat – (3e^2/8 + 3e^4/32 + 45e^6/1024+....)sin(2 lat) + (15e^4/256 + 45e^6/1024 +.....)sin(4 lat) – (35e^6/3072 + ....)sin(6 lat) + .....] with lat in radians and MO for latO, the latitude of the origin, derived in the same way. rho = a . mO / sin(latO) + MO – M T = a . m (lon – lonO) / rho with lon and lonO in radians For the reverse calculation: X = FE – W Y = FN – S rho = ± [X^2 + (a . mO / sin(latO) – Y)^2]^0.5 taking the sign of latO M = a . mO / sin(latO) + MO – rho mu = M / [a (1 – e^2/4 – 3e^4/64 – 5e^6/256 – …)] e1 = [1 – (1 – e^2)^0.5] / [1 + (1 – e^2)^0.5] lat = mu + ((3 e1 / 2) – (27 e1^3 / 32) +.....)sin(2 mu) + ((21 e1^2 / 16) – (55 e1^4 / 32) + ....)sin(4 mu) + ((151 e1^3 / 96) +.....)sin(6 mu) + ((1097 e1^4 / 512) – ....)sin(8 mu) + ...... m = cos(lat) / (1 – e^2 sin^2(lat))^0.5 If latO is not negative lon = lonO + rho {atan2[X , (a . mO / sin(latO) – Y)]} / a . m but if lonO is negative lon = lonO + rho {atan2[–X , –(a . mO , sin(latO) – Y)]} / a . m In either case, if lat = ±90°, m = 0 and the equation for lon is indeterminate, so use lon = lonO. See implementation notes in GN7-2 preface for atan2 convention. In these formulas the terms FE and FN retain their definition, i.e. in the Bonne (South Orientated) method they increase the Westing and Southing value at the natural origin. In this method they are effectively false westing (FW) and false southing (FS) respectively.