367c7fd372b978721cf7798ff3dede2974df8a66
[plewww.git] / plot-latlong / CONFIG
1 OVERVIEW
2
3 This document describes the format of the .mapinfo configuration file,
4 which specifies the maps (and their projection parameters) available to
5 users of plot-latlong.
6
7
8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9 SYNTAX
10
11 The .mapinfo file has a simple line-oriented syntax.  Each line
12 independently specifies some piece of information, and the order of the
13 lines is unimportant.  Blank lines and lines starting with '#', which
14 may be preceded by whitespace, are ignored.  All other lines must have
15 the syntax described below.
16
17 We use a few conventions in the following description of the syntax.
18 Placeholders are denoted by words enclosed in angle brackets (e.g.,
19 <map-name>).  All other words are literals that should be included
20 verbatim.  The order of the words on each line is significant.  One or
21 more whitespace characters should separate the individual words on each line.
22
23 1) map definitions:
24
25   MAP <map-name> <image-path> <top-lat> <top-long> <bot-lat> <bot-long>
26
27   MAP World World100.png 90 -170 -90 190
28
29 These lines specify a map that is available to the user and supply some
30 basic attributes.
31
32 The values are
33
34   <map-name> -- the name of the map; this is the name used for the '-m'
35              command line argument; the name must consist of letters,
36              digits, and underscores--no spaces are allowed
37
38   <image-path> -- the name of the PNG file containing the map image; the
39              path is relative to the location of the .mapimages directory,
40              so in most cases, the path can be a simple filename such as
41              "World100.png"
42
43   <top-lat>
44   <top-long> -- the lat/long of the top-left corner of the map image in
45              decimal degrees
46
47   <bot-lat>
48   <bot-long> -- the lat/long of the bottom-right corner of the map image in
49              decimal degrees
50
51
52 2) map projection parameters:
53
54   PROJECTION <map-name> <projection-name> <projection parameters>
55
56   PROJECTION  USA50 ALBER  704.0 30.8 45.5 21.86 -99.9 232 388
57
58 These lines specify the parameters for nonlinear map projections.  In
59 contrast, the values given in MAP lines are sufficient for linear map
60 projections.
61
62 The values are
63
64   <map-name> -- the name of the map; this value should match the name used
65              in the corresponding MAP line
66
67   <projection-name> -- the name of the nonlinear projection that will be
68              applied to the map; currently, if maps are not linear, they may
69              have one nonlinear projection specified for them; multiple
70              nonlinear projections for the same map are not allowed
71
72   <projection parameters> -- a variable set of values that provides the
73              actual parameters for the map projection; see below for details
74
75
76 The following describes the supported projections and their parameters.
77 Only one projection is currently supported:
78
79   ALBER -- an Alber/Lambert projection; this is used by the USA maps
80            included in the distribution    
81
82            See the publication "Map Projections Used by the U.S. Geological
83            Survey Bulletin 1532" for details about this projection.
84
85     parameters:
86
87      <R> <phi_1> <phi_2> <phi_0> <lambda_0> <false-easting> <false-northing>
88
89      where
90
91        <R> -- radius of sphere
92        <phi_1> -- standard parallel (lower)
93        <phi_2> -- standard parallel (upper)
94        <phi_0> -- origin latitude
95        <lambda_0> -- origin longitude
96        <false-easting> -- the false easting amount
97        <false-northing> -- the false northing amount
98
99
100 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
101 TIPS & TRICKS
102
103 Creating maps at different scales is both useful and relatively easy.
104 The following describes the steps for creating maps at different scales
105 using existing maps:
106
107  1) Use an image editing tool/package like ImageMagick or NetPBM to create
108     a map image at a different size; e.g.,
109
110       convert -scale '50%' .mapimages/World100.png .mapimages/World50.png
111
112     would create a half-sized image using the 'convert' tool of ImageMagick.
113
114  2) Add a MAP line to .mapinfo; specifically, copy the MAP line of the 
115     source map and change the map name and image path--don't change the
116     lat/long parameters; e.g.,
117
118          MAP World100 World100.png 90 -170 -90 190
119      =>  MAP World50  World50.png  90 -170 -90 190
120
121  3) For maps created with nonlinear projections, add a PROJECTION line to
122     .mapinfo; again, you may simply copy and tweak the PROJECTION line of
123     the source map; e.g.,
124
125         PROJECTION  USA50 ALBER  704.0 30.8 45.5 21.86 -99.9 232 388
126         PROJECTION USA100 ALBER 1408.0 30.8 45.5 21.86 -99.9 464 776
127         PROJECTION USA200 ALBER 2816.0 30.8 45.5 21.86 -99.9 928 1552
128
129     For the Alber/Lambert projection, you need only change the <R>,
130     <false-easting>, and <false-northing> parameters.  These values change
131     in direct proportion to the change in size of the image itself.  For
132     example, if the size is halved, then these parameter values should be
133     halved; if the size is doubled, then the values should be doubled.
134     In the above example, USA100 is the USA map at 100%; USA50 and USA200
135     represent images at 50% and 200%, respectively.