blob: c0320021572208b924696fce452c70ed2b5291a8 [file] [log] [blame]
rsc058b0112005-01-03 06:40:20 +00001.TH MAP 1
2.SH NAME
rsc94b5e3f2005-01-04 21:20:04 +00003map, mapdemo, mapd \- draw maps on various projections
rsc058b0112005-01-03 06:40:20 +00004.SH SYNOPSIS
5.B map
6.I projection
7[
8.I option ...
9]
10.PP
11.B mapdemo
12.PP
13.SH DESCRIPTION
14.I Map
15prepares on the standard output a
16map suitable for display by any
17plotting filter described in
18.IR plot (1).
19A menu of projections is produced in response to an unknown
20.IR projection .
21.I Mapdemo
22is a short course in mapping.
23.PP
24The default data for
25.I map
26are world shorelines.
27Option
28.B -f
29accesses more detailed data
30classified by feature.
31.TP
32.BR -f " [ \fIfeature\fR ... ]"
33Features are ranked 1 (default) to 4 from major to minor.
34Higher-numbered ranks include all lower-numbered ones.
35Features are
36.RS
37.TF country[1-3]
38.TP
39.BR shore [ 1 - 4 ]
40seacoasts, lakes, and islands; option
41.B -f
42always shows
43.B shore1
44.TP
45.BR ilake [ 1 - 2 ]
46intermittent lakes
47.TP
48.BR river [ 1 - 4 ]
49rivers
50.TP
51.BR iriver [ 1 - 3 ]
52intermittent rivers
53.TP
54.BR canal [ 1 - 3 ]
55.BR 3 =irrigation
56canals
57.TP
58.BR glacier
59.TP
60.BR iceshelf [ 12 ]
61.TP
62.BR reef
63.TP
64.BR saltpan [ 12 ]
65.TP
66.BR country [ 1 - 3 ]
67.BR 2 =disputed
68boundaries,
69.BR 3 =indefinite
70boundaries
71.TP
72.BR state
73states and provinces (US and Canada only)
74.PD
75.RE
76.PP
77In other options
78coordinates are in degrees, with north latitude
79and west longitude counted as positive.
80.TP 0
81.BI -l " S N E W"
82Set the southern and northern latitude
83and the eastern and western longitude limits.
84Missing arguments are filled out from the list
85\-90, 90, \-180, 180,
86or lesser limits suitable to the
87projection at hand.
88.TP
89.BI -k " S N E W
90Set the scale as if for a map with limits
91.B -l
92.I "S N E W"\f1.
93Do not consider any
94.B -l
95or
96.B -w
97option in setting scale.
98.TP
99.BI -o " lat lon rot"
100Orient the map in a nonstandard position.
101Imagine a transparent gridded sphere around the globe.
102Turn the overlay about the North Pole
103so that the Prime Meridian (longitude 0)
104of the overlay coincides with meridian
105.I lon
106on the globe.
107Then tilt the North Pole of the
108overlay along its Prime Meridian to latitude
109.I lat
110on the globe.
111Finally again turn the
112overlay about its `North Pole' so
113that its Prime Meridian coincides with the previous position
114of meridian
115.IR rot .
116Project the map in
117the standard form appropriate to the overlay, but presenting
118information from the underlying globe.
119Missing arguments are filled out from the list
12090, 0, 0.
121In the absence of
122.BR - o ,
123the orientation is 90, 0,
124.IR m ,
125where
126.I m
127is the middle of the longitude range.
128.TP
129.BI -w " S N E W"
130Window the map by the specified latitudes
131and longitudes in the tilted, rotated coordinate system.
132Missing arguments are filled out from the list \-90, 90, \-180, 180.
133(It is wise to give an encompassing
134.B -l
135option with
136.BR -w .
137Otherwise for small windows computing time
138varies inversely with area!)
139.TP
140.BI -d " n"
141For speed, plot only every
142.IR n th
143point.
144.TP
145.B -r
146Reverse left and right
147(good for star charts and inside-out views).
148.ns
149.TP
150.B -v
151Verso.
152Switch to a normally suppressed sheet of the map, such as the
153back side of the earth in orthographic projection.
154.TP
155.B -s1
156.br
157.ns
158.TP
159.B -s2
160Superpose; outputs for a
161.B -s1
162map (no closing) and a
163.B -s2
164map (no opening) may be concatenated.
165.TP
166.BI -g " dlat dlon res"
167Grid spacings are
168.IR dlat ,
169.IR dlon .
170Zero spacing means no grid.
171Missing
172.I dlat
173is taken to be zero.
174Missing
175.I dlon
176is taken the same as
177.IR dlat .
178Grid lines are drawn to a resolution of
179.I res
180(2° or less by default).
181In the absence of
182.BR - g ,
183grid spacing is 10°.
184.TP
185.BI -p " lat lon extent"
186Position the point
187.I lat, lon
188at the center of the plotting area.
189Scale the map so that the height (and width) of the
190nominal plotting area is
191.I extent
192times the size of one degree of latitude
193at the center.
194By default maps are scaled and positioned
195to fit within the plotting area.
196An
197.I extent
198overrides option
199.BR -k .
200.TP
201.BI -c " x y rot"
202After all other positioning and scaling operations
203have been performed, rotate the image
204.I rot
205degrees counterclockwise about the center
206and move the center to position
207.IR x ,
208.IR y ,
209where the nominal plotting area is
210.RI \-1≤ x ≤1,
211.RI \-1≤ y ≤1.
212Missing arguments are taken to be 0.
213.BR -x
214Allow the map to extend outside the nominal plotting area.
215.TP
216.BR -m " [ \fIfile\fP ... ]"
217Use
218map data from named files.
219If no files are named, omit map data.
220Names that do not exist as pathnames are looked up in
221a standard directory, which contains, in addition to the
222data for
223.BR -f ,
224.RS
225.LP
226.TF counties
227.TP
228.B world
229World Data Bank I (default)
230.TP
231.B states
232US map from Census Bureau
233.TP
234.B counties
235US map from Census Bureau
236.PD
237.RE
238.IP
239The environment variables
240.B MAP
241and
242.B MAPDIR
243change the default
244map and default directory.
245.TP
246.BI -b " \fR[\fPlat0 lon0 lat1 lon1\fR... ]"
247Suppress the drawing of the normal boundary
248(defined by options
249.BR -l
250and
251.BR -w ).
252Coordinates, if present, define the vertices of a
253polygon to which the map is clipped.
254If only two vertices are given, they are taken to be the
255diagonal of a rectangle.
256To draw the polygon, give its vertices as a
257.B -u
258track.
259.TP
260.BI -t " file ..."
261The
262.I files
263contain lists of points,
264given as latitude-longitude pairs in degrees.
265If the first file is named
266.LR - ,
267the standard input is taken instead.
268The points of each list are plotted as connected `tracks'.
269.IP
270Points in a track file may be followed by label strings.
271A label breaks the track.
272A label may be prefixed by
273\fL"\fR,
274.LR : ,
275or
276.L !
277and is terminated by a newline.
278An unprefixed string or a string prefixed with
279.L
280"
281is displayed at the designated point.
282The first word of a
283.L :
284or
285.L !
286string names a special symbol (see option
287.BR -y ).
288An optional numerical second word is a scale factor
289for the size of the symbol, 1 by default.
290A
291.L :
292symbol is aligned with its top to the north; a
293.L !
294symbol is aligned vertically on the page.
295.TP
296.BI -u " file ..."
297Same as
298.BR -t ,
299except the tracks are
300unbroken lines.
301.RB ( -t
302tracks appear as dot-dashed lines if the plotting filter supports them.)
303.TP
304.BI -y " file
305The
306.I file
307contains
308.IR plot (7)-style
309data for
310.L :
311or
312.L !
313labels in
314.B -t
315or
316.B -u
317files.
318Each symbol is defined by a comment
319.BI : name
320then a sequence of
321.L m
322and
323.L v
324commands.
325Coordinates (0,0) fall on the plotting point.
326Default scaling is as if the nominal plotting range were
327.LR "ra -1 -1 1 1" ;
328.L ra
329commands in
330.I file
331change the scaling.
332.SS Projections
333Equatorial projections centered on the Prime Meridian
334(longitude 0).
335Parallels are straight horizontal lines.
336.PP
337.PD 0
338.TP 1.5i
339.B mercator
340equally spaced straight meridians, conformal,
341straight compass courses
342.TP
343.B sinusoidal
344equally spaced parallels,
345equal-area, same as
346.LR "bonne 0" .
347.TP
348.BI cylequalarea " lat0"
349equally spaced straight meridians, equal-area,
350true scale on
351.I lat0
352.TP
353.B cylindrical
354central projection on tangent cylinder
355.TP
356.BI rectangular " lat0"
357equally spaced parallels, equally spaced straight meridians, true scale on
358.I lat0
359.TP
360.BI gall " lat0"
361parallels spaced stereographically on prime meridian, equally spaced straight
362meridians, true scale on
363.I lat0
364.TP
365.B mollweide
366(homalographic) equal-area, hemisphere is a circle
367.br
368.B gilbert()
369sphere conformally mapped on hemisphere and viewed orthographically
370.TP
371.B gilbert
372globe mapped conformally on hemisphere, viewed orthographically
373.PD
374.PP
375Azimuthal projections centered on the North Pole.
376Parallels are concentric circles.
377Meridians are equally spaced radial lines.
378.PP
379.PD 0
380.TP 1.5i
381.B azequidistant
382equally spaced parallels,
383true distances from pole
384.TP
385.B azequalarea
386equal-area
387.TP
388.B gnomonic
389central projection on tangent plane,
390straight great circles
391.TP
392.BI perspective " dist"
393viewed along earth's axis
394.I dist
395earth radii from center of earth
396.TP
397.B orthographic
398viewed from infinity
399.TP
400.B stereographic
401conformal, projected from opposite pole
402.TP
403.B laue
404.IR radius " = tan(2\(mu" colatitude ),
405used in X-ray crystallography
406.TP
407.BI fisheye " n"
408stereographic seen from just inside medium with refractive index
409.I n
410.TP
411.BI newyorker " r"
412.IR radius " = log(" colatitude / r ):
413.I New Yorker
414map from viewing pedestal of radius
415.I r
416degrees
417.PD
418.PP
419Polar conic projections symmetric about the Prime Meridian.
420Parallels are segments of concentric circles.
421Except in the Bonne projection,
422meridians are equally spaced radial
423lines orthogonal to the parallels.
424.PP
425.PD 0
426.TP 1.5i
427.BI conic " lat0"
428central projection on cone tangent at
429.I lat0
430.TP
431.BI simpleconic " lat0 lat1"
432equally spaced parallels, true scale on
433.I lat0
434and
435.I lat1
436.TP
437.BI lambert " lat0 lat1"
438conformal, true scale on
439.I lat0
440and
441.I lat1
442.TP
443.BI albers " lat0 lat1"
444equal-area, true scale on
445.I lat0
446and
447.I lat1
448.TP
449.BI bonne " lat0"
450equally spaced parallels, equal-area,
451parallel
452.I lat0
453developed from tangent cone
454.PD
455.PP
456Projections with bilateral symmetry about
457the Prime Meridian
458and the equator.
459.PP
460.PD 0
461.TP 1.5i
462.B polyconic
463parallels developed from tangent cones,
464equally spaced along Prime Meridian
465.TP
466.B aitoff
467equal-area projection of globe onto 2-to-1
468ellipse, based on
469.I azequalarea
470.TP
471.B lagrange
472conformal, maps whole sphere into a circle
473.TP
474.BI bicentric " lon0"
475points plotted at true azimuth from two
476centers on the equator at longitudes
477.IR ±lon0 ,
478great circles are straight lines
479(a stretched
480.IR gnomonic
481)
482.TP
483.BI elliptic " lon0"
484points plotted at true distance from
485two centers on the equator at longitudes
486.I ±lon0
487.TP
488.B globular
489hemisphere is circle,
490circular arc meridians equally spaced on equator,
491circular arc parallels equally spaced on 0- and 90-degree meridians
492.TP
493.B vandergrinten
494sphere is circle,
495meridians as in
496.IR globular ,
497circular arc parallels resemble
498.I mercator
499.PD
500.PP
501Doubly periodic conformal projections.
502.PP
503.TP 1.5i
504.B guyou
505W and E hemispheres are square
506.PD 0
507.TP
508.B square
509world is square with Poles
510at diagonally opposite corners
511.TP
512.B tetra
513map on tetrahedron with edge
514tangent to Prime Meridian at S Pole,
515unfolded into equilateral triangle
516.TP
517.B hex
518world is hexagon centered
519on N Pole, N and S hemispheres are equilateral
520triangles
521.PD
522.PP
523Miscellaneous projections.
524.PP
525.PD 0
526.TP 1.5i
527.BI harrison " dist angle"
528oblique perspective from above the North Pole,
529.I dist
530earth radii from center of earth, looking
531along the Date Line
532.I angle
533degrees off vertical
534.TP
535.BI trapezoidal " lat0 lat1"
536equally spaced parallels,
537straight meridians equally spaced along parallels,
538true scale at
539.I lat0
540and
541.I lat1
542on Prime Meridian
543.PD
544.br
545.B lune(lat,angle)
546conformal, polar cap above latitude
547.I lat
548maps to convex lune with given
549.I angle
550at 90\(deE and 90\(deW
551.PP
552Retroazimuthal projections.
553At every point the angle between vertical and a straight line to
554`Mecca', latitude
555.I lat0
556on the prime meridian,
557is the true bearing of Mecca.
558.PP
559.PD 0
560.TP 1.5i
561.BI mecca " lat0"
562equally spaced vertical meridians
563.TP
564.BI homing " lat0"
565distances to Mecca are true
566.PD
567.PP
568Maps based on the spheroid.
569Of geodetic quality, these projections do not make sense
570for tilted orientations.
571For descriptions, see corresponding maps above.
572.PP
573.PD 0
574.TP 1.5i
575.B sp_mercator
576.TP
577.BI sp_albers " lat0 lat1"
578.SH EXAMPLES
579.TP
580.L
581map perspective 1.025 -o 40.75 74
582A view looking down on New York from 100 miles
583(0.025 of the 4000-mile earth radius) up.
584The job can be done faster by limiting the map so as not to `plot'
585the invisible part of the world:
586.LR "map perspective 1.025 -o 40.75 74 -l 20 60 30 100".
587A circular border can be forced by adding option
588.LR "-w 77.33" .
589(Latitude 77.33° falls just inside a polar cap of
590opening angle arccos(1/1.025) = 12.6804°.)
591.TP
592.L
593map mercator -o 49.25 -106 180
594An `equatorial' map of the earth
595centered on New York.
596The pole of the map is placed 90\(de away (40.75+49.25=90)
597on the
598other side of the earth.
599A 180° twist around the pole of the map arranges that the
600`Prime Meridian' of the map runs from the pole of the
601map over the North Pole to New York
602instead of down the back side of the earth.
603The same effect can be had from
604.L
605map mercator -o 130.75 74
606.TP
607.L
608map albers 28 45 -l 20 50 60 130 -m states
609A customary curved-latitude map of the United States.
610.TP
611.L
612map harrison 2 30 -l -90 90 120 240 -o 90 0 0
613A fan view covering 60° on either
614side of the Date Line, as seen from one earth radius
615above the North Pole gazing at the
616earth's limb, which is 30° off vertical.
617The
618.B -o
619option overrides the default
620.BR "-o 90 0 180" ,
621which would rotate
622the scene to behind the observer.
623.SH FILES
624.TF /lib/map/[1-4]??
625.TP
626.B /lib/map/[1-4]??
627World Data Bank II, for
628.B -f
629.TP
630.B /lib/map/*
631maps for
632.B -m
633.TP
634.B /lib/map/*.x
635map indexes
636.TP
rscc8b63422005-01-13 04:49:19 +0000637.B mapd
rsc058b0112005-01-03 06:40:20 +0000638Map driver program
639.SH SOURCE
rscc3674de2005-01-11 17:37:33 +0000640.B \*9/src/cmd/map
rsc058b0112005-01-03 06:40:20 +0000641.SH "SEE ALSO"
642.IR map (7),
643.IR plot (1)
644.SH DIAGNOSTICS
645`Map seems to be empty'\(ema coarse survey found
646zero extent within the
647.B -l
648and
649.BR -w
650bounds; for maps of limited extent
651the grid resolution,
652.IR res ,
653or the limits may have to be refined.
654.SH BUGS
655Windows (option
656.BR -w )
657cannot cross the Date Line.
658No borders appear along edges arising from
659visibility limits.
660Segments that cross a border are dropped, not clipped.
661Excessively large scale or
662.B -d
663setting may cause long line segments to be dropped.
664.I Map
665tries to draw grid lines dotted and
666.B -t
667tracks dot-dashed.
668As very few plotting filters properly support
669curved textured lines, these lines are likely to
670appear solid.
671The west-longitude-positive convention
672betrays Yankee chauvinism.
673.I Gilbert
674should be a map from sphere to sphere, independent of
675the mapping from sphere to plane.