Oblique map projections using rotation matrices † Waldo ... - AVCS

4 downloads 10188 Views 254KB Size Report
computers the primary aids for this purpose were pre-computed tables, giving the spherical coordinates of five degree latitude/longitude intersections for a pole ...
Oblique map projections using rotation matrices † Waldo Tobler Ecological modelling is normally done using a map for locational reference. The map will be based on some map projection. In some cases it is desirable to tailor the projection to the area. One method is to choose an oblique map projection. Oblique and transverse versions of any map projection of a sphere can be obtained with relative ease by multiplication of the position vectors of geographic data by orthogonal rotation matrices. The properties of a map projection do not depend on its positioning relative to the globe. Thus an azimuthal equidistant projection has the property that all distances and directions from the center point to all other locations are correctly depicted. These properties hold for this projection no matter where it is centered. Several discussions of map projections, e.g., Chamberlin (1947, p. 90), Robinson (1953, p. 53) therefore conceive of the latitude and longitude graticule as a loose frame which can be shifted over the globe to be centered at any location. Re-centering a projection can be used to take advantage of the projections’ special properties and can thus provide more useful maps. The computation of an oblique map projection, relative to this shifted frame, is considerably simplified because the equations for each projection then take their simplest normal form. The alternative, which of course yields the same answer, is to derive and present more complicated general formulae that include all oblique and transverse versions of a projection. Compare. for example, the elaborate procedure detailed in Thornthwaite (1927) or Lee (1954) with the simple procedure given here. The computation of the shifted frame is the present focus. The usual conversion to an oblique global frame is by way of spherical trigonometry, which is then used to generate spherical coordinates centered on a new pole. The algebra for this is well known (Cayley 1843) and has been used to good effect by Barton (1976). Graphical methods, as described by Harrison (1943), can also be used. But before the introduction of stored program computers the primary aids for this purpose were pre-computed tables, giving the spherical coordinates of five degree latitude/longitude intersections for a pole centered at latitude increments of five degrees. An extensive table of this kind is found in Hammer (1889. pp. 149ff), repeated in Wagner (1962. pp. 265ff). The same method is given in contemporary cartography books. But an easier method, widely used today in computer graphics (Plastock & Kalley, 1986, pp. 117), is to apply rotations via matrix multiplications. Virtually no spherical trigonometry is required for this. The process consists of just a few elementary steps; the detailed algebra is in the appendix of this chapter. The steps are: 1)Convert the latitude and longitude of a point whose shifted coordinates are required to its position in three dimensional space. 2)Rotate about the North-South axis by a multiplication by a rotation matrix to bring the desired central meridian into coincidence with the Greenwich meridian. 3)Rotate about an equatorial axis by multiplication by a rotation matrix to bring the equator or pole to the desired latitude.

4)Rotate by a matrix multiplication to place the “north” direction in the desired position. This step is omitted if the conventional orientation is retained. 5)Using the inverse to step 1) compute the new, shifted, latitude and longitude of the point. 6)Apply the map projection equations to the shifted latitude and longitude coordinates. An example is perhaps helpful. Consider the equal area map of the world in a square given by x = λ/√π, y = √π sin φ where x and y represent the (two-dimensional, plane) map projection coordinates and φ and λ represent the latitude and longitude, respectively, of a point on a sphere of unit radius. This slightly unusual equal area projection maps the entire surface of the world into a square and has advantages for geographic information systems (Tobler & Chen, 1986). In the present context it saves display space and still retains equality of surface areas. The usual case shows the projection centered at the equator and the Greenwich meridian (φ = 0, λ = 0). To position this at Santa Barbara, California, at approximately 34 N, 120 W, first apply the rotation Rz[I20]. The result, shown as a map centered on 120 W, is given in Figure la. Then apply the rotation Ry[-34] yielding the map shown in Figure lb. Thus for any point P[X, Y, Z]’ the rotated position vector is given by P’ = Ry[-34] Rz[120] P. The map projection equations are then applied to the new position vector P’ when converted back to the latitudes and longitudes of the new frame. North need not be on the central meridian. Use a rotation Rx[α] to position this at α degrees. Alternatively, center the map at the North Pole, as a transverse cylindric projection. This only requires the rotation Rz[120] followed by Ry[-56] when using Santa Barbara as the center (Figures 2a and 2b). There are two simple cases to be considered. First, cylindric projections, (including pseudocylindrics, polycylindrics, and polyconics) in which the rotations bring the origin (Greenwich meridian and equator) to the desired position. This was the case in the first example, and rectangular plane coordinates are used for the map projection. Second, azimuthal and conical projections are more conveniently treated using polar plane coordinates and the rotation Ry then uses the colatitude instead of the latitude as a parameter, to rotate the North Pole to the center of the map (Figure 2b). A third, more complicated, case is when one knows, say, only two points on a great circle that is to form the major axis of the projection. Then there will also be a rotation about the X-axis. For this a little vector algebra is useful; an example is given in the appendix of this chapter, and shown in Figures 3a and 3b. For the truly perspective map projections the method described can also be reformulated using four dimensional homogeneous coordinates to include the projectivity coefficients in the matrix multiplication, again as is common in computer graphics (Plastock & Kalley op. cit., p. 293). As a final note, some caution should be exercised in applying this method to maps of the ellipsoid since the mapping equations may no longer be rotation invariant; but see Kao (1967). For maps of the sphere the method of course also simplifies the computation of measures of distortion such as those of Tissot (1881). The same method can be applied to the unscrambling of the inverse equations for an oblique or transverse map projection since the inverses of the orthogonal rotation matrices can be obtained by inspection.

It has thus been shown that spherical trigonometry is not required for the study of map projections. and instead that simple multiplication by orthogonal matrices suffices. Fortunately most of today's geography students are familiar with matrix algebra because of its widespread use in human ecological modelling. Appendix Let φ, λ be the latitude and longitude of a point on a sphere of radius R. Then the position vector P has components P(X, Y, Z) =

|X = R cos φ cos λ | |Y = R cos φ sin λ | |Z = R sin φ |

These equations can be deduced from elementary trigonometry; no spherical trigonometry is required. In the study of map projections the spherical radius R is conveniently taken to be unity, and can thus be ignored. In this system the origin of the latitude and longitude parameterization at the intersection of the equator and the Greenwich meridian, has coordinates φ = 0, λ. = 0, P = [1, 0, 0]’. The North Pole is then at P = [0, 0, 1]’ and the South Pole at P = [0, 0, -1]’. The point P = [0, 1, 0]’ is on the equator at 90 degrees East. The inverse equations are R = (X2 + Y2 + Z2)½ φ = sin -1 (Z/R) λ = tan -1 (Y/X) The rotations about the X, Y, Z axes are denoted by Rx, Ry and Rz, respectively. When an explicit angle is given it will be included in brackets. e.g., Rx[20] means a 20 degree rotation in the positive direction about the X axis. Although degrees are written in this manner the computer programs will use radians, and positive angles are taken to be counterclockwise, the usual mathematical convention. Care must be exercised in getting the proper sign on the angles; observe that the sphere, not the frame, is being rotated. Thus to get the meridian through Santa Barbara moved to the Greenwich meridian requires a positive rotation, and to get the equator up to the latitude of Santa Barbara requires a clockwise (negative) rotation. To get the pole down to the latitude of Santa Barbara requires a counterclockwise (positive) rotation. In the rotation matrices C will denote the cosine and S the sine of an angle. The three rotation matrices are |1 0 0| | C 0 -S | | C -S 0 | Rx = |0 C -S | Ry = | 0 1 0 | Rz = | S C 0 | |0 S C| | S 0 C| | 0 0 1| They are easily remembered because the row and column pertaining to X, Y, or Z respectively are the ones which do not contain trigonometric functions. Each rotation is in the plane perpendicular to the axis given by the subscript, and each is an orthogonal transformation. Recall, importantly, that matrix multiplication does not commute. so that RzRy does not equal RyRz. An inexpensive text covering matrix algebra that can be recommended is Pettofrezzo (1966).

In the example of the text, Santa Barbara (at 34 N and 120 W) has the position vector (-0.414519, -0.717968, 0.559193]’ in a three-dimensional space. After rotation by Ry[34] Rz[120] it’s position vector is [1.0.0]’ and it’s map projection coordinates are x = 0, y = 0. Next, take Zurich Switzerland at, á peu près, 47.5 N latitude. 8.5 E longitude. The position vector is. using R = 1 as radius, P=[0.668169, 0.099859, 0.737277]’. Then P’ = Ry[34]Rz[l20] P=[0.0631625, 0.5287224, 0.8464075]’, and φ’ = 57.82, λ‘ = 83.14 degrees and the map position is at .x = 0.81863, y = 1.50017. The same twofold rotation is applied to every point to be plotted on the map. Since the rotation matrices are constants for any one position centering they would of course be used in their composite form, after multtplication. e.g.. Ryz[-34, 120] = Ry[-34]Rz[120]. The general composite matrix Rxyz = RxRyRZ is also easily obtained. Some computers have matrix multiplication hardware, and the process can be vectorized. so that the computations can proceed very rapidly. To position the shifted pole at Santa Barbara for an oblique azimuthal or conical projection. or for a transverse cylindrical projection. use Ry[56]Rz[120] as the composite rotation (compare Figure 2). The slightly more complicated case, in which one has a great circle passing through two points. can be treated as follows. Let P1 be the position vector of the westerly point, and P2 that of the easterly point. Then the position vector of the midpoint is obtained from the vector mean (P1 + P2)/|P1 + P2|, and the latitude and longitude of this point are given by the inverse equations previously noted. For the great circle connecting Santa Barbara and Zurich this lands at 62.74 N, 67.69 W, near Frobischer Bay in Baffin Land. The rotations about the Z axis and Y axis can now be applied to bring this point to the origin of the coordinate system. The initial position vector of the midpoint is [0.173912, -0.423797, 0.888904]’ and the rotation Ryz[-62.74, 67.69] brings it to [1,0,0]’. We also need the oblique pole for this positioning, if we wish the great circle connecting the two points to be horizontal on the map. The position vector for the location of this pole is given by the vector cross-product (P1 x P2)/|P1 x P2| and this puts it at 26.05 N, 130.75 E, south of Japan in the ocean east of Okinawa. The position vector is [-0.586369, 0.680630, 0.439220]’. Since this point is to have coordinates [0, 0, 1]’ after the rotation about the X axis we must solve the matrix equation |0 | |1 0 0| | X | |0 | = |0 C -S| |Y | |1 | |0 S C| |Z | for the unknown rotation angle. Here the vector [X, Y, Z]’ is the location of the oblique pole after the rotation about the Z and Y axes. The solution turns out to be very elementary: Z is the cosine of the rotation angle, and Y is equal to its sine. The X component of the position vector is zero, since this vector is perpendicular to the plane spanned by P1 and P2. After the rotation

Ryz[-62.74, 67.69] the oblique pole at 26.05 N, 130.75 E takes the position [0.000000, -0.2841438, 0.9587817]’. The inverse cosine of 0.9587817 is 16.507 degrees. All of the required elements are now known. Figure 4 show the result of the rotation Rxyz[-l6.51,-62.73, 67.69] followed by the map projection conversion. The horizontal line in the center of the map is the great circle arc connecting Zürich and Santa Barbara. References Barton, B. (1976) A note on the transformation of spherical coordinates. In: The American Cartographer. Vol. 3, No. .2,pp. 161-168. Cayley, A. (1843) On the rotation of a solid body. In: Cambridge Mathematical Journal Vol. 3, pp.224-232. Chamberlin, W. (1947) The Round Earth on Flat Paper. National Geographic Society. Washington DC. Harrison, R. (1943) The nomograph as an instrument in map making. In: The Geographical Review. Vol. 33, No. 4, pp. 655-657. Hammer, E. (1889) Die Geographisch wichtigsten Kartenprojektionen. Metzler. Stuttgart. Kao, R. (1967) Geometric projections in system studies. In: Garrison, W. & Marble D., eds., Quantitative Geography: Part II: Physical and Cartographic Topics. Northwestern University Studies in Geography, No. 14,, pp. 243- 323, Evanston. Lee, L. (1954) The oblique Mercator projection, The New Zealand Geographer. Vol. 10. No. 2. pp. 151-164. Pestofrezzo, A. (1966) Matrices and Transformations. Dover, New York. Plastock, R. & Kalley, G. (1986) Computer Graphics, Schaum’s Outline. New York. Robinson, A. (1953) Elements of Cartography. Wiley, New York. Thornthwaite, C. (1927) The cylindrical equal area projection for a new map of Eurasia and Africa. In: Publications in Geography. University of California, Vol.2, No 6. pp.211-230. Tissot, M. (1881) Mémoire sur Ia representation des surfaces. Gautier Villars. Paris. Tobler, W. & Chen, Z. (1986) A quadtree for global information storage. In: Geographic Analysis. Vol. 16, No. 4, pp. 360-371. Wagner, K-H. (1962) Kartographische Netzenrwürfe. Bibliographisches Institut, Mannheim.

Prof Dr. Waldo Tobler Department of Geography University of California Santa Barbara CA 93106-4060 Tel: (+1) 805/893 3831, Fax: (+1)805/893 31 46 e-mail: [email protected]

Published as pp. 37-46 of H. Ernste, ed., Pathways to Human Ecology, Steiner Festschrift, Berne, P. Lang, 1994.

Figure 2a: As before but with a rotation.

Figure 2b: The transverse case with the North Pole at the center