Geographic Information Processing Computational Basics Coordinate Systems Coordinate transformations Projections UTM calculations Calculations Wikipedia 3/22/2016 Distances and areas Spherical Trigonometry © 2009 Raymond P. Jefferis III Lect 02 - 1 Coordinate Systems • Earth ellipsoid • The Datum 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 2 The Earth Ellipsoid • An ellipsoid represents shape of the earth more accurately than a sphere • It requires more specification parameters than a spherical model (which would only require a radius) 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 3 Ellipsoid Measures 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 4 Earth Dimensions • Equatorial radius 6,378,206 m • Polar semi-axis: 6,356,583 m • Radius of sphere: 6,370,997 m (equal area) • Radius of geoid: 6,378,200 m (gravitational equipotential surface approximately at the mean sea level) 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 5 Parameters of Earth Ellipsoid Reference Ellipsoidal parameters: Name Major axis, “a” [km]Flattening, “f” WGS84 6378.13700 1/298.257223563 GRS80/NAD83 6378.13700 1/298.257222101 WGS66 6378.145 1/298.25 GRS67/IAU68 6378.16000 1/298.2472 WGS72 6378.135 1/298.26 NAD27 6378.2064 1/294.9786982138 Note: polar radius = equatorial radius * ( 1 - f ) or b = a * ( 1 - f ) 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 6 Differences • WGS84 b = 6356.7523142 [km] • NAD83 b = 6356.7523141 [km] The difference is 0.1 mm (100 µ) ! (Note: this is about the thickness of a human hair.) 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 7 Radius Approximation For the purposes of this course, a spherical earth having a radius of 6, 378, 200 meters (The geoid radius) can be used. Note: Using such a spherical model results in significant errors over large distances. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 8 The Datum • A mathematical model of the earth – A starting point (Latitude, Longitude) on earth – Parameters for the spheroidal model used – Result: Origin separation between spheroid and earth models • Examples: – NAD27 (North American Datum of 1927) – NAD83 (North American Datum of 1983) 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 9 Geodetic Datum • A point on the surface of the Earth is used to pin down the position and orientation of the ellipsoid model relative to the earth itself. This is the Datum. • This is not the only method, but it was used for many years. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 10 NAD27 The North American Datum of 1927 is a based on the Clarke 1866 spheroid, anchored at "Meades Ranch" in Kansas. Each point in the model is referred to this point on the earth. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 11 Meades Ranch, KS North American Datum of 1927 (NAD 27) at 39 。13′26.686″N, 98。32′30.506″W, Wikipedia 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 12 NAD83 The North American Datum of 1983 is based on the GRS 1980 ellipsoid This is nearly identical to the similarly geocentric WGS 1984 ellipsoid. It is earth-centered based on the GRS80 spheroid. There is no initial point. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 13 Coordinate Transformations • Conversion of Datum Model equations are used for converting from one datum to another. • Software - GEOTRANS 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 14 Conversion of Datum Model Molodensky formula See URL: http://www.kartografie.nl/ geometrics/Coordinate%20 transformations/coordtrans.html 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 15 GEOTRANS Converts between MANY datum models: http://earth-info.nga.mil/GandG/geotrans/ Uses the Molodensky formulas http://earth-info.nga.mil/GandG/coordsys/datums/standardmolodensky.html 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 16 Molodensky Transformation • Transfers local coordinates to WGS84 WGS 84 Local WGS 84 Local hWGS 84 hLocal h • Increments are calculated from the subject formulas (See previous reference) 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 17 Projections Projections represent the surface of the earth projected onto another surface, allowing the viewer access to more or less rectangular coordinates - albeit with scale changes over the viewed surface. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 18 Projected Earth Topography GTOPO30 global digital elevation model (DEM), U.S. Geological Survey 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 19 Web References on projections http://en.wikipedia.org/wiki/Map_projection http://members.shaw.ca/quadibloc/maps/mapint.htm http://members.shaw.ca/quadibloc/maps/mcyl01.htm http://www.geometrie.tuwien.ac.at/karto/ http://www.kartografie.nl/geometrics/Coordinate%2 0transformations/coordtrans.html 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 20 Transverse Mercator Projection • The meridians and parallels form a nearly rectangular net around the center of the map. • The map will be used only in this regular area, which is centered on a given longitude and latitude. Equatorial projection: J. B. Calvert, U. Denver, 2002. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 21 Mercator Projection Formulas x tanh 1 B tan cos( 0 ) 0 y tan sin D sin 1 cosh x 1 x 0 tan 1 sinh cos D where B cos sin( 0 ) D y 0 x is equatorial projection y is projection on longitude λ0 λ is longitude ϕ is latitude From Eric Weisstein,MathWorld, Wolfram Research 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 22 UTM Conversion Example • Use UTM conversion spreadsheet in the Models file: – – – – – Lat: 27.15˚ Lon: -94.625˚ Datum: NAD27 xsw = Easting: 339117.761 [meters] ysw = Northing; 3015001.964 [meters] 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 23 Conversion Formulas http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM Students should be able to program their own conversion programs from the clear formulas given on this site. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 24 References [See note] • Snyder, J. P., 1987; Map Projections - A Working Manual. U.S. Geological Survey Professional Paper 1395, 383 p. • Army, Department of, 1973; Universal Transverse Mercator Grid, U. S. Army Technical Manual TM 5-241-8, 64 p. • NIMA Technical Report 8350.2, "Department of Defense World Geodetic System 1984, Its Definition and Relationships with Local Geodetic Systems," Second Edition, 1 September 1991 and its supplements. [ U.S. Geological Survey, Box 25286, Denver Federal Center, Denver, Colorado 80225 or by phone at 1-800-USA-MAPS.] Note: These references are from the excellent paper (referenced in previous slide) of Steven Dutch, Natural and Applied Sciences, University of Wisconsin - Green Bay. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 25 Calculations • Area approximations • Distances • Spherical trigonometry 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 26 Area Approximations Since the circumference of the earth varies with latitude, areas of rectangles 1˚ on a side are different at various latitudes. The calculation can be done as follows: 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 27 Distance Formulas a = 6378.137000 km [WGS84 earth radius] f = 1/298.257223563 [WGS84 flattening] e2 = f*(2-f) [Eccentricity] R1 = a(1-e2)/(1-e2*(Sin(lat0))2)3/2 R2 = a/Sqrt(1-e2*(Sin(lat0))2) North_Distance = R1*dlat East_Distance = R2*Cos(lat0)*dlon From: Aviation Formulary V1.43, Ed Williams 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 28 ® Mathematica Notebook lat0 = Degree 40.0; lon0 = Degree 76.0 dlat = Degree 1.0; dlon = Degree 1.0; a = 6378.137000; f = 1.0/298.257223563; esq = f*(2.0 - f); r1 = a*(1 - esq)/(1.0 esq*(Sin[lat0])^2)^(3/2) r2 = a/(Sqrt[1 - esq*(Sin[lat0])^2]) distN = r1*dlat distE = r2*Cos[lat0]*dlon 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 29 Example Calculation 1 At 40˚ North latitude, 76˚ West longitude, a square of 1˚ will have the planar dimensions: North_Distance = 111.035 km East_Distance = 85.3939 km This will apply to the data included on your data CD. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 30 1˚x 1˚ Areas at Various Latitudes Lat. 0 10 20 30 40 50 60 70 80 90 3/22/2016 ∆ Lon. 110, 567 m 110, 598 m 110, 692 m 110, 840 m 111, 023 m 111, 220 m 111, 406 m 111, 560 m 111, 661 m 111, 699 m © 2009 Raymond P. Jefferis III ∆ Lat. 111, 321 m 109, 641 m 104, 649 m 96, 448 m 85, 396 m 71, 698 m 55, 802 m 38, 188 m 9, 735 m 0 m Lect 02 - 31 Example Calculation 2 At 40˚ North latitude, 76˚ West longitude, a square of 7.5´ (standard quadrangle) will have the planar dimensions: North_Distance = 13.8793 km (about 463 30 meter cells) East_Distance = 10.6742 km (about 356 30 meter cells) The Malvern quadrangle used in many of the lecture examples is of this size. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 32 Note on Spherical Model NOTE: Although spherical trigonometry will be used for calculations in this course, the earth is really an ellipsoid. Calculations based on the spherical model, acceptable for the purposes of this course, will be slightly in error. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 33 Spherical Trigonometry • Solves triangles formed by three points on a sphere • If two of these points lie in a plane that includes the center of the sphere, the arc between them is a Great Circle. • The length of a Great Circle arc [radians] is found by the Cosine Formula. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 34 Cosine Formula cos c cos a cosb sin a sinb cosC Wikipedia 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 35 Example Find the Great Circle distance (c) between: London (Lat. 51.501080, Lon. - 0.126693) Philadelphia (Lat. 39.952712, Lon. - 75.163524) Answer: 5706.41 km [Calculations follow, Mathematica® Notebook in Models file “Distance” in course Web site] 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 36 Calculations Differential longitude: [Angle C] -75.0368 -1.30964 degrees radians Polar angle [a] to B: 50.0473 0.87349 38.4989 0.671933 0.625774 5706.41 degrees radians degrees radians radians km Polar angle [b] to A: Cosine of arc c: Length of arc c: 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 37 Mathematica® Notebook (* Lattitude of Point A [London] *) lat1 = 51.501080; (* Longitude of Point A [London] *) lon1 = -0.126693; (* Lattitude of Point B [Philadelphia] *) lat2 = 39.952712; (* Longitude of Point B [Philadelphia] *) lon2 = -75.163524; 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 38 Computations (continued) (* Included angle *) dlon = lon2 - lon1; rlon = Degree dlon; (* POLAR ANGLE TO B *) dp2 = 90 - lat2; rp2 = Degree dp2; (* POLAR ANGLE TO A *) dp1 = 90 - lat1; rp1 = Degree dp1; 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 39 Computations (continued) (* Cosine of arc *) ca = Cos[rp2]*Cos[rp1] + Sin[rp2]*Sin[rp1]*Cos[rlon] (* Spherical radius of Earth *) r = 6378200.0; (* Length of arc {km} *) cd = ArcCos[ca]*r/1000 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 40 Bearings • For finding bearings, the Sine Formula may be useful. • Calculations involving small angles may require extended precision. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 41 Sine Formula sin a / sin A sinb / sin B sin c / sinC Wikipedia 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 42 Example - Downingtown Quadrangle Find the distance [a] and bearing [C] between: E. Nantmeal (Lat. 40.12246, Lon. -75.72445) (Point B) Eagle (Lat. 40.07907, Lon. -75.68838) (Point C) Answer: 5.724 km 329.266 degrees [Calculations follow. Mathematica® Notebook in Models file “Bearing” in course Web site] 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 43 Calculations Differential longitude: [Angle A] Polar angle [c] to B: Length of arc a: -0.03607 -0.00062954 49.8875 0.870527 49.9209 0.871285 5.724 degrees radians degrees radians degrees radians km Bearing to B: 329.266 degrees Polar angle [b] to C: 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 44 Mathematica® Notebook (* Lattitude of Point C *) lat1 = 40.07907; (* Longitude of Point C *) lon1 = -75.68838; (* Lattitude of Point B *) lat2 = 40.12246; (* Longitude of Point B *) lon2 = -75.72445; 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 45 Procedure 1. Calculate arc CB 2. Calculate angle C 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 46 Computations 1 (* Included angle *) angA = lonB - lonC; rA = Degree angA; (* POLAR ANGLE TO B *) dpB = 90 - latB; rpB = Degree dpB; (* POLAR ANGLE TO C *) dpC = 90 - latC; rpC = Degree dpC; 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 47 Computations 1 (continued) (* Cosine of arc *) ca = SetPrecision[Cos[rpB]*Cos[rpC] + Sin[rpB]*Sin[rpC]*Cos[rA], 10] (* Spherical radius of Earth *) r = 6378200; (* Length of arc {km} *) cd = ArcCos[ca]*r/1000 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 48 Results ca = 0.9999995973 Note: extra precision (10 places) was used to avoid roundoff to unity. ra = 5.724 Note: result is in kilometers 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 49 Computations 2 (* By the Sine Formula: Sin[C]=Sin[A]*Sin[c]/Sin[a] *) snc = Sin[rA]* sc/Sin[ra]; AngleC = snc/Degree BearingC = 360 -AngleC 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 50 Results • AngleC = 30.7339 degrees • Bearing = 329.266 degrees • Slide to follow will show the path superimposed on a topographical map. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 51 Display of Calculated Path Topographic map of Downingtown quadrangle showing calculated path. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 52 Homework Problem Notes (1) Use distance example above (2) First point on Great Circle through origin. Calculate distance in radians. (3) Subsequent points at 30 degree intervals. Use Cosine Rule. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 53 Workshop 1 Using a spreadsheet on a laboratory computer please complete ALL of the calculations requested on the distributed Workshop 1 handout. 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 54 Questions ? 3/22/2016 © 2009 Raymond P. Jefferis III Lect 02 - 55