Data source: EPSG
Information source: Environmental Systems Research Institute, Inc. (ESRI).
Revision date: 2024-08-06
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 forward conversion from 2D geographic coordinates latitude and longitude (Lat, Lon) begins by: Xp = nu cos(Lat) sin(Lon – LonC) Yp = –sin(LatC) [nu cos(Lat) cos(Lon – LonC) – nuC cos(LatC)] + cos(LatC) [nu (1.0 – e^2) sin(Lat) – nuC (1.0 – e^2) sin(LatC)] where LatC, LonC are the latitude and longitude of the projection origin on the ellipsoid, e is the eccentricity of the ellipsoid and e^2 = (a^2 – b^2)/a^2 = 2f – f^2, nu is the radius of curvature in the prime vertical at latitude Lat; nu = a / (1 – e^2 sin^2(Lat))^0.5, nuC is the radius of curvature in the prime vertical at the latitude of the projection centre LatC; nuC = a / (1 – e^2 sin^2(LatC))^0.5, Then applying the azimuth α (positive clockwise from true North), scale factor at the projection centre kc, and false easting and false northing at the projection centre (Ec,Nc): E = Ec + kc [cos(α) Xp – sin(α) Yp] N = Nc + kc [sin(α) Xp + cos(α) Yp] Reverse For the reverse formulas for latitude and longitude corresponding to a given Easting (E) and Northing (N), first remove the false easting, false northing, rotation, and scale factor: Xp = cos(α) (E – Ec) / kc + sin(α) (N – Nc) / kc Yp = –sin(α) (E – Ec) / kc + cos(α) (N – Nc) / kc To simplify the calculation of the latitude and longitude values, some interim quantities are calculated: B = 1 – e^2 cos^2(LatC) C = Yp – nuO sin(LatC) cos(LatC) + nuC (1 – e^2) cos(LatC) sin(LatC) D = { (1 – e^2) [(a^2 – Xp^2) (1 – e^2 cos^2(latC)) – C^2] }^0.5 Xg = (–C sin(LatC) + D cos(LatC)) / B Yg = Xp Zg = (C cos(LatC) (1 – e^2) + D sin(LatC) ) / B Then: Lat = atan2(Zg, (1 – e^2) [Xg^2 + Yg^2]^0.5) Lon = LonC + atan2(Yg, Xg)
For Projected Coordinate Reference System: NAD83(2011) / San Francisco SFO B18. Parameters: Ellipsoid: GRS80 a = 6378137.0 metres 1/f = 298.257222101 from which: e = 0.081819191 e^2 = 0.006694380 Latitude of projection centre (LatC) 37°37'44.289"N = 0.656749406 rad Longitude of projection centre (LonC) 122°23'38.190"W = -2.136177266 rad Azimuth of initial line (α) 27°47'34" = 0.485075480 rad Scale factor at projection centre (kc) 0.9999968 Easting at projection centre (Ec) 0 m Northing at projection centre (Nc) 0 m Forward calculation for: Latitude (Lat) = 37°37'33.877"N = 0.656698927 rad Longitude (Lon) = 122°23'04.700"W = -2.136014902 rad nuC = 6386110.046 m nu= 6386109.000 m Xp = 821.217 m Yp = -320.965 m Then: Easting, E = 876.136 m Northing, N = 98.974 m For the reverse calculation for these E, N coordinates into latitude (Lat) and longitude (Lon): Xp = 821.217 m Yp = -320.965 m B = 0.995801057 C = -20992.833 D = 6343357.666 Xg = 5057874.044 Yg = 821.217 Zg = 3872656.155 which results in: Latitude (Lat) = 0.656698927 rad = 37°37'09'33.877"N Longitude (Lon) = -2.136014902 rad = 122°23'04.700"W