Annotation of researchv10dc/man/adm/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 float 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:                float radianlat, sinlat, coslat;
                     82:                float 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:        float 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(r)
                    211: .IR radius " = log(" colatitude / r ):
                    212: .I New Yorker
                    213: map from viewing pedestal of radius
                    214: .I r
                    215: degrees
                    216: .PP
                    217: Polar conic projections symmetric about the Prime Meridian.
                    218: Parallels are segments of concentric circles.
                    219: Except in the Bonne projection,
                    220: meridians are equally spaced radial
                    221: lines orthogonal to the parallels.
                    222: .br
                    223: .ns
                    224: .IP
                    225: .B conic(lat0)
                    226: central projection on cone tangent at
                    227: .I lat0
                    228: .br
                    229: .B simpleconic(lat0,lat1)
                    230: equally spaced parallels, true scale on
                    231: .I lat0
                    232: and
                    233: .I lat1
                    234: .br
                    235: .B lambert(lat0,lat1)
                    236: conformal, true scale on 
                    237: .I lat0
                    238: and 
                    239: .I lat1
                    240: .br
                    241: .B albers(lat0,lat1)
                    242: equal-area, true scale on
                    243: .I lat0
                    244: and 
                    245: .I lat1
                    246: .br
                    247: .B bonne(lat0)
                    248: equally spaced parallels, equal-area,
                    249: parallel
                    250: .I lat0
                    251: developed from tangent cone
                    252: .PP
                    253: Projections with bilateral symmetry about
                    254: the Prime Meridian
                    255: and the equator.
                    256: .br
                    257: .ns
                    258: .IP
                    259: .B polyconic()
                    260: parallels developed from tangent cones,
                    261: equally spaced along Prime Meridian
                    262: .br
                    263: .B aitoff()
                    264: equal-area projection of globe onto 2-to-1
                    265: ellipse, based on 
                    266: .I azequalarea
                    267: .br
                    268: .B lagrange()
                    269: conformal, maps whole sphere into a circle
                    270: .br
                    271: .B bicentric(lon0)
                    272: points plotted at true azimuth from two
                    273: centers on the equator at longitudes
                    274: .I \(+-lon0,
                    275: great circles are straight lines
                    276: (a stretched gnomonic projection)
                    277: .br
                    278: .B elliptic(lon0)
                    279: points are plotted at true distance from
                    280: two centers on the equator at longitudes
                    281: .I \(+-lon0
                    282: .br
                    283: .B globular()
                    284: hemisphere is circle,
                    285: circular arc meridians equally spaced on equator,
                    286: circular arc parallels equally spaced on 0- and 90-degree meridians
                    287: .br
                    288: .B vandergrinten()
                    289: sphere is circle,
                    290: meridians as in
                    291: .I globular,
                    292: circular arc parallels resemble 
                    293: .I mercator
                    294: .PP
                    295: Doubly periodic conformal projections.
                    296: .br
                    297: .ns
                    298: .IP
                    299: .B guyou()
                    300: W and E hemispheres are square
                    301: .br
                    302: .B square()
                    303: world is square with Poles
                    304: at diagonally opposite corners
                    305: .br
                    306: .B tetra()
                    307: map on tetrahedron with edge
                    308: tangent to Prime Meridian at S Pole,
                    309: unfolded into equilateral triangle
                    310: .br
                    311: .B hex()
                    312: world is hexagon centered
                    313: on N Pole, N and S hemispheres are equilateral
                    314: triangles
                    315: .PP
                    316: Miscellaneous projections.
                    317: .br
                    318: .ns
                    319: .IP
                    320: .B harrison(dist,angle)
                    321: oblique perspective from above the North Pole,
                    322: .I dist
                    323: earth radii from center of earth, looking
                    324: along the Date Line
                    325: .I angle
                    326: degrees off vertical
                    327: .br
                    328: .B trapezoidal(lat0,lat1)
                    329: equally spaced parallels,
                    330: straight meridians equally spaced along parallels,
                    331: true scale at
                    332: .I lat0
                    333: and
                    334: .I lat1
                    335: on Prime Meridian
                    336: .PP
                    337: Retroazimuthal projections.
                    338: At every point the angle between vertical and a straight line to
                    339: `Mecca', latitude
                    340: .I lat0
                    341: on the prime meridian,
                    342: is the true bearing of Mecca.
                    343: .br
                    344: .ns
                    345: .IP
                    346: .B mecca(lat0)
                    347: equally spaced vertical meridians
                    348: .br
                    349: .B homing(lat0)
                    350: distances to `Mecca' are true
                    351: .PP
                    352: Maps based on the spheroid.
                    353: Of geodetic quality, these projections do not make sense
                    354: for tilted orientations.
                    355: For descriptions, see corresponding maps above.
                    356: .br
                    357: .ns
                    358: .IP
                    359: .B sp_mercator()
                    360: .br
                    361: .B sp_albers(lat0,lat1)
                    362: .SH "SEE ALSO
                    363: .IR map (7), 
                    364: .IR map (5), 
                    365: .IR plot (3)
                    366: .SH BUGS
                    367: Only one projection and one orientation can be active at a time.
                    368: .br
                    369: The west-longitude-positive convention
                    370: 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.