Annotation of researchv10dc/man/man3/proj.3, revision 1.1.1.1

1.1       root        1: .TH PROJ 3X bowell
                      2: .CT 2 graphics math
                      3: .br
                      4: .SH NAME
                      5: orient, normalize \- map projections
                      6: .SH SYNOPSIS
                      7: .B orient(lat, lon, rot)
                      8: .br
                      9: .B double lat, lon, rot;
                     10: .PP
                     11: .B normalize(p)
                     12: .br
                     13: .B struct place *p;
                     14: .SH DESCRIPTION
                     15: Users of
                     16: .IR map (7)
                     17: may skip to the description of `Projection generators'
                     18: below.
                     19: .PP
                     20: The functions
                     21: .I orient
                     22: and
                     23: .I normalize
                     24: plus a collection of map projection generators
                     25: are loaded by
                     26: option
                     27: .BR -lmap 
                     28: of
                     29: .IR ld (1).
                     30: Most of them
                     31: calculate maps for a spherical earth.
                     32: Each map projection is available in one standard
                     33: form, into which data must be normalized
                     34: for transverse
                     35: or nonpolar projections.
                     36: .PP
                     37: Each standard projection is displayed with the Prime
                     38: Meridian (longitude 0) being a straight vertical line, along which North
                     39: is up.
                     40: The orientation of nonstandard projections is specified by
                     41: .I orient.
                     42: Imagine a transparent gridded sphere around the globe.
                     43: First turn the overlay about the North Pole
                     44: so that the Prime Meridian (longitude 0)
                     45: of the overlay coincides with meridian
                     46: .I lon
                     47: on the globe.
                     48: Then tilt the North Pole of the
                     49: overlay along its Prime Meridian to latitude
                     50: .I lat
                     51: on the globe.
                     52: Finally again turn the
                     53: overlay about its `North Pole' so
                     54: that its Prime Meridian coincides with the previous position
                     55: of (the overlay's) meridian
                     56: .I rot.
                     57: Project the desired map in
                     58: the standard form appropriate to the overlay, but presenting
                     59: information from the underlying globe.
                     60: It is not useful to use
                     61: .I orient
                     62: without using
                     63: .IR normalize .
                     64: .PP
                     65: .I Normalize
                     66: converts latitude-longitude coordinates on the globe
                     67: to coordinates on the overlaid grid.
                     68: The coordinates and their sines and cosines
                     69: are input to
                     70: .I normalize
                     71: in a
                     72: .B place
                     73: structure.
                     74: Transformed coordinates and their sines and cosines
                     75: are returned in the same structure.
                     76: .PP
                     77: .EX
                     78: .nr xx \w'12345678'
                     79: .ta \n(xxu +\n(xxu +\n(xxu +\n(xxu +\n(xxu +\n(xxu
                     80:        struct place {
                     81:                double radianlat, sinlat, coslat;
                     82:                double radianlon, sinlon, coslon;
                     83:        };
                     84: .EE
                     85: .PP
                     86: The projection generators
                     87: return a pointer to a function that converts normalized coordinates
                     88: to 
                     89: .I x-y
                     90: coordinates for the desired map, or
                     91: 0 if the required projection
                     92: is not available.
                     93: The returned function is exemplified by
                     94: .I proj 
                     95: in this example:
                     96: .PP
                     97: .EX
                     98: .ta \n(xxu +\n(xxu +\n(xxu +\n(xxu +\n(xxu +\n(xxu
                     99:        struct place pt;
                    100:        int (*proj)() = mercator();
                    101:        double x, y;
                    102: .EE
                    103: .PP
                    104: .EX
                    105:        orient(45.0, 30.0, 180.0);      /* set coordinate rotation */
                    106: .EE
                    107: .PP
                    108: .EX
                    109:        . . .                           /* fill in the pt structure */
                    110:        normalize(&pt);                 /* rotate coordinates */
                    111:        if((*proj)(&pt, &x, &y) > 0)    /* project onto x,y plane */
                    112:                plot(x, y);
                    113: .EE
                    114: .PP
                    115: The projection function
                    116: .B (*proj)()
                    117: returns 1 for a good point,
                    118: 0 for a point on a wrong
                    119: sheet (e.g. the back of the world in a perspective
                    120: projection), and \-1 for a point that is deemed
                    121: unplottable (e.g. points near the poles on a Mercator projection).
                    122: .PP
                    123: Scaling may be determined from the
                    124: .I x-y
                    125: coordinates of
                    126: selected points.
                    127: Latitudes and longitudes are measured in degrees for
                    128: ease of specification for
                    129: .I orient 
                    130: and the projection generators
                    131: but in radians for ease of calculation 
                    132: for
                    133: .I normalize
                    134: and
                    135: .I proj.
                    136: In either case
                    137: latitude is measured positive north of the equator,
                    138: and longitude positive west of Greenwich.
                    139: Radian longitude should be limited to the range
                    140: .if t .I \-\(*p\(<=lon<\(*p.
                    141: .if n .I -pi <= lon < pi.
                    142: .SS Projection generators
                    143: Equatorial projections centered on the Prime Meridian
                    144: (longitude 0).
                    145: Parallels are straight horizontal lines.
                    146: .br
                    147: .ns
                    148: .IP
                    149: .B mercator()
                    150: equally spaced straight meridians, conformal,
                    151: straight compass courses
                    152: .br
                    153: .B sinusoidal()
                    154: equally spaced parallels,
                    155: equal-area, same as
                    156: .I bonne(0)
                    157: .br
                    158: .B cylequalarea(lat0)
                    159: equally spaced straight meridians, equal-area,
                    160: true scale on
                    161: .I lat0
                    162: .br
                    163: .B cylindrical()
                    164: central projection on tangent cylinder
                    165: .br
                    166: .B rectangular(lat0)
                    167: equally spaced parallels, equally spaced straight meridians, true scale on
                    168: .I lat0
                    169: .br
                    170: .B gall(lat0)
                    171: parallels spaced stereographically on prime meridian, equally spaced straight
                    172: meridians, true scale on
                    173: .I lat0
                    174: .br
                    175: .B mollweide()
                    176: (homalographic) equal-area, hemisphere is a circle
                    177: .PP
                    178: Azimuthal projections centered on the North Pole.
                    179: Parallels are concentric circles.
                    180: Meridians are equally spaced radial lines.
                    181: .br
                    182: .ns
                    183: .IP
                    184: .B azequidistant()
                    185: equally spaced parallels,
                    186: true distances from pole
                    187: .br
                    188: .B azequalarea()
                    189: equal-area
                    190: .br
                    191: .B gnomonic()
                    192: central projection on tangent plane,
                    193: straight great circles
                    194: .br
                    195: .B perspective(dist)
                    196: viewed along earth's axis
                    197: .I dist
                    198: earth radii from center of earth
                    199: .br
                    200: .B orthographic()
                    201: viewed from infinity
                    202: .br
                    203: .B stereographic()
                    204: conformal, projected from opposite pole
                    205: .br
                    206: .B laue()
                    207: .IR radius " = tan(2\(mu" colatitude ),
                    208: used in xray crystallography
                    209: .br
                    210: .B fisheye(n)
                    211: stereographic seen from just inside medium with refractive index n
                    212: .br
                    213: .B newyorker(r)
                    214: .IR radius " = log(" colatitude / r ):
                    215: extreme `fisheye' view from pedestal of radius
                    216: .I r
                    217: degrees
                    218: .PP
                    219: Polar conic projections symmetric about the Prime Meridian.
                    220: Parallels are segments of concentric circles.
                    221: Except in the Bonne projection,
                    222: meridians are equally spaced radial
                    223: lines orthogonal to the parallels.
                    224: .br
                    225: .ns
                    226: .IP
                    227: .B conic(lat0)
                    228: central projection on cone tangent at
                    229: .I lat0
                    230: .br
                    231: .B simpleconic(lat0,lat1)
                    232: equally spaced parallels, true scale on
                    233: .I lat0
                    234: and
                    235: .I lat1
                    236: .br
                    237: .B lambert(lat0,lat1)
                    238: conformal, true scale on 
                    239: .I lat0
                    240: and 
                    241: .I lat1
                    242: .br
                    243: .B albers(lat0,lat1)
                    244: equal-area, true scale on
                    245: .I lat0
                    246: and 
                    247: .I lat1
                    248: .br
                    249: .B bonne(lat0)
                    250: equally spaced parallels, equal-area,
                    251: parallel
                    252: .I lat0
                    253: developed from tangent cone
                    254: .PP
                    255: Projections with bilateral symmetry about
                    256: the Prime Meridian
                    257: and the equator.
                    258: .br
                    259: .ns
                    260: .IP
                    261: .B polyconic()
                    262: parallels developed from tangent cones,
                    263: equally spaced along Prime Meridian
                    264: .br
                    265: .B aitoff()
                    266: equal-area projection of globe onto 2-to-1
                    267: ellipse, based on 
                    268: .I azequalarea
                    269: .br
                    270: .B lagrange()
                    271: conformal, maps whole sphere into a circle
                    272: .br
                    273: .B bicentric(lon0)
                    274: points plotted at true azimuth from two
                    275: centers on the equator at longitudes
                    276: .I \(+-lon0,
                    277: great circles are straight lines
                    278: (a stretched gnomonic projection)
                    279: .br
                    280: .B elliptic(lon0)
                    281: points are plotted at true distance from
                    282: two centers on the equator at longitudes
                    283: .I \(+-lon0
                    284: .br
                    285: .B globular()
                    286: hemisphere is circle,
                    287: circular arc meridians equally spaced on equator,
                    288: circular arc parallels equally spaced on 0- and 90-degree meridians
                    289: .br
                    290: .B vandergrinten()
                    291: sphere is circle,
                    292: meridians as in
                    293: .I globular,
                    294: circular arc parallels resemble 
                    295: .I mercator
                    296: .PP
                    297: Doubly periodic conformal projections.
                    298: .br
                    299: .ns
                    300: .IP
                    301: .B guyou()
                    302: W and E hemispheres are square
                    303: .br
                    304: .B square()
                    305: world is square with Poles
                    306: at diagonally opposite corners
                    307: .br
                    308: .B tetra()
                    309: map on tetrahedron with edge
                    310: tangent to Prime Meridian at S Pole,
                    311: unfolded into equilateral triangle
                    312: .br
                    313: .B hex()
                    314: world is hexagon centered
                    315: on N Pole, N and S hemispheres are equilateral
                    316: triangles
                    317: .PP
                    318: Miscellaneous projections.
                    319: .br
                    320: .ns
                    321: .IP
                    322: .B harrison(dist,angle)
                    323: oblique perspective from above the North Pole,
                    324: .I dist
                    325: earth radii from center of earth, looking
                    326: along the Date Line
                    327: .I angle
                    328: degrees off vertical
                    329: .br
                    330: .B trapezoidal(lat0,lat1)
                    331: equally spaced parallels,
                    332: straight meridians equally spaced along parallels,
                    333: true scale at
                    334: .I lat0
                    335: and
                    336: .I lat1
                    337: on Prime Meridian
                    338: .PP
                    339: Retroazimuthal projections.
                    340: At every point the angle between vertical and a straight line to
                    341: `Mecca', latitude
                    342: .I lat0
                    343: on the prime meridian,
                    344: is the true bearing of Mecca.
                    345: .br
                    346: .ns
                    347: .IP
                    348: .B mecca(lat0)
                    349: equally spaced vertical meridians
                    350: .br
                    351: .B homing(lat0)
                    352: distances to `Mecca' are true
                    353: .PP
                    354: Maps based on the spheroid.
                    355: Of geodetic quality, these projections do not make sense
                    356: for tilted orientations.
                    357: For descriptions, see corresponding maps above.
                    358: .br
                    359: .ns
                    360: .IP
                    361: .B sp_mercator()
                    362: .br
                    363: .B sp_albers(lat0,lat1)
                    364: .SH "SEE ALSO
                    365: .IR map (7), 
                    366: .IR map (5), 
                    367: .IR plot (3)
                    368: .SH BUGS
                    369: Only one projection and one orientation can be active at a time.
                    370: .br
                    371: The west-longitude-positive convention
                    372: betrays Yankee chauvinism.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.