File: mapproject.html

package info (click to toggle)
gmt-doc 3.4-1.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,756 kB
  • ctags: 1,800
  • sloc: makefile: 30
file content (398 lines) | stat: -rw-r--r-- 19,334 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
<HTML>
<HEAD>
<TITLE>mapproject</TITLE>
</HEAD>
<BODY>
<H1>mapproject</H1>
<HR>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
       mapproject - Forward and Inverse map transformation of 2-D
       coordinates


</PRE>
<H2>SYNOPSIS</H2><PRE>
       <B>mapproject</B> <I>infiles</I> <B>-J</B><I>parameters</I> <B>-R</B><I>west/east/south/north</I>[<B>r</B>]
       [ <B>-C</B> ] [ <B>-Dc|i|m|p</B> ] [ <B>-F</B>[<B>k|m|n|i|c|p</B>] ] [ <B>-H</B>[<I>nrec</I>] ] [ <B>-I</B>
       ] [ <B>-M</B>[<I>flag</I>] ] [ <B>-S</B> ] [ <B>-V</B> ] [ <B>-:</B> ] [ <B>-bi</B>[<B>s</B>][<I>n</I>] ] [ <B>-bo</B>[<B>s</B>]
       ]


</PRE>
<H2>DESCRIPTION</H2><PRE>
       <B>mapproject</B>  reads  (longitude,  latitude)  positions  from
       <I>infiles</I> [or standard input] and computes (x,y) coordinates
       using  the  specified  map projection and scales.  Option
       ally, it can read (x,y) positions and compute  (longitude,
       latitude)  values  doing  the inverse transformation. This
       can be used to transform linear (x,y) points  obtained  by
       digitizing a map of known projection to geographical coor
       dinates.  Additional data fields are permitted  after  the
       first  2  columns  which must have (longitude,latitude) or
       (x,y).  See option <B>-:</B> on how to read  (latitude,longitude)
       files.
               No  space  between the option flag and the associ
       ated arguments. Use upper case for the  option  flags  and
       lower case for modifiers.

       <I>infiles</I>
              Data file(s) to be transformed. If not given, stan
              dard input is read.

       <B>-J</B>     Selects the map projection. The following character
              determines  the  projection.  If  the  character is
              upper  case  then  the  argument(s)   supplied   as
              scale(s)  is  interpreted  to  be the map width (or
              axis lengths), else the scale  argument(s)  is  the
              map scale (see its definition for each projection).
              UNIT is cm, inch,  or  m,  depending  on  the  MEA
              SURE_UNIT  setting in .<A HREF="gmtdefaults.html">gmtdefaults</A>, but this can be
              overridden on the command line by appending  c,  i,
              or  m to the scale/width values.  Choose one of the
              following projections (The <B>E</B> or <B>C</B> after  projection
              names  stands for Equal-Area and Conformal, respec
              tively):

              <B>CYLINDRICAL</B> <B>PROJECTIONS:</B>

              <B>-Jc</B><I>lon0/lat0/scale</I> or <B>-JC</B><I>lon0/lat0/width</I> (Cassini)
                      Give projection center and scale (1:xxxx or
              UNIT/degree).
              <B>-Jj</B><I>lon0/scale</I>  or <B>-JJ</B><I>lon0/width</I> (Miller Cylindrical
              Projection)
                      Give the central meridian and scale (1:xxxx
              or UNIT/degree).
                              Give scale along equator (1:xxxx or
              UNIT/degree).
                      <B>-Jm</B><I>lon0/lat0/scale</I> or <B>-JM</B><I>lon0/lat0/width</I>
                              Give  central  meridian,   standard
              latitude   and  scale  along  parallel  (1:xxxx  or
              UNIT/degree).
              <B>-Jo</B><I>parameters</I> (Oblique Mercator <B>[C]</B>).  Specify  one
              of:
                      <B>-Joa</B><I>lon0/lat0/azimuth/scale</I>              or
              <B>-JOa</B><I>lon0/lat0/azimuth/width</I>
                              Set projection center,  azimuth  of
              oblique equator, and scale.
                      <B>-Job</B><I>lon0/lat0/lon1/lat1/scale</I>            or
              <B>-JOb</B><I>lon0/lat0/lon1/lat1/scale</I>
                              Set  projection   center,   another
              point on the oblique equator, and scale.
                      <B>-Joc</B><I>lon0/lat0/lonp/latp/scale</I>            or
              <B>-JOc</B><I>lon0/lat0/lonp/latp/scale</I>
                              Set  projection  center,  pole   of
              oblique projection, and scale.
                      Give scale along oblique equator (1:xxxx or
              UNIT/degree).
              <B>-Jq</B><I>lon0/scale</I> or <B>-JQ</B><I>lon0/width</I> (Equidistant  Cylin
              drical Projection (Plate Carree))
                      Give the central meridian and scale (1:xxxx
              or UNIT/degree).
              <B>-Jt</B><I>parameters</I> (Transverse  Mercator  <B>[C]</B>).  Specify
              one of:
                      <B>-Jt</B><I>lon0/scale</I> or <B>-JT</B><I>lon0/width</I>
                              Give the central meridian and scale
              (1:xxxx or UNIT/degree).
                      <B>-Jt</B><I>lon0/lat0/scale</I> or <B>-JT</B><I>lon0/lat0/width</I>
                              Give projection  center  and  scale
              (1:xxxx or UNIT/degree).
              <B>-Ju</B><I>zone/scale</I>  or  <B>-JU</B><I>zone/width</I>  (UTM  - Universal
              Transverse Mercator <B>[C]</B>)
                      Give  the  zone  number  (1-60)  and  scale
              (1:xxxx or UNIT/degree).
                      zones:  prepend  - or + to enforce southern
              or northern  hemisphere  conventions  [northern  if
              south &gt; 0].
              <B>-Jy</B><I>lon0/lats/scale</I>   or  <B>-JY</B><I>lon0/lats/width</I>  (Basic
              Cylindrical Projections <B>[E]</B>)
                      Give the central meridian, standard  paral
              lel, and scale (1:xxxx or UNIT/degree).
                      The  standard  parallel is typically one of
              these (but can be any value):
                      45 - The Peters projection
                      37.4 - The Trystan Edwards projection
                      30 - The Behrman projection
                      0 - The Lambert projection

              <B>[E]</B>).
                      <I>lon0/lat0</I>  specifies the projection center.
                      Give scale as 1:xxxx or  <I>radius/lat</I>,  where
              <I>radius</I> is distance
                      in UNIT from origin to the oblique latitude
              <I>lat</I>.
              <B>-Je</B><I>lon0/lat0/scale</I> or <B>-JE</B><I>lon0/lat0/width</I>  (Equidis
              tant).
                      <I>lon0/lat0</I>  specifies the projection center.
                      Give scale as 1:xxxx or  <I>radius/lat</I>,  where
              <I>radius</I> is distance
                      in UNIT from origin to the oblique latitude
              <I>lat</I>.
              <B>-Jf</B><I>lon0/lat0/horizon/scale</I>  or   <B>-JF</B><I>lon0/lat0/hori</I>
              <I>zon/width</I> (Gnomonic).
                      <I>lon0/lat0</I>  specifies the projection center.
                      <I>horizon</I> specifies  the  max  distance  from
              projection center (in degrees, &lt; 90).
                      Give  scale  as 1:xxxx or <I>radius/lat</I>, where
              <I>radius</I> is distance
                      in UNIT from origin to the oblique latitude
              <I>lat</I>.
              <B>-Jg</B><I>lon0/lat0/scale</I>  or  <B>-JG</B><I>lon0/lat0/width</I>  (Ortho
              graphic).
                      <I>lon0/lat0</I> specifies the projection  center.
                      Give  scale  as 1:xxxx or <I>radius/lat</I>, where
              <I>radius</I> is distance
                      in UNIT from origin to the oblique latitude
              <I>lat</I>.
              <B>-Js</B><I>lon0/lat0/scale</I>  or  <B>-JS</B><I>lon0/lat0/width</I> (General
              Stereographic <B>[C]</B>)
                      <I>lon0/lat0</I> specifies the projection  center.
                      Give  scale  as  1:xxxx  (true  at pole) or
              <I>slat</I>/1:xxxx (true at standard parallel <I>slat</I>)
                      or <I>radius/lat</I> (<I>radius</I> in UNIT  from  origin
              to the oblique latitude <I>lat</I>).

              <B>CONIC</B> <B>PROJECTIONS:</B>

              <B>-Jb</B><I>lon0/lat0/lat1/lat2/scale</I>                     or
              <B>-JB</B><I>lon0/lat0/lat1/lat2/width</I> (Albers <B>[E]</B>)
                      Give projection center, two standard paral
              lels, and scale (1:xxxx or UNIT/degree).
              <B>-Jd</B><I>lon0/lat0/lat1/lat2/scale</I>                     or
              <B>-JD</B><I>lon0/lat0/lat1/lat2/width</I> (Equidistant)
                      Give projection center, two standard paral
              lels, and scale (1:xxxx or UNIT/degree).
              <B>-Jl</B><I>lon0/lat0/lat1/lat2/scale</I>                     or
              <B>-JL</B><I>lon0/lat0/lat1/lat2/width</I> (Lambert <B>[C]</B>)
                      Give  origin,  2  standard  parallels,  and
              scale along these (1:xxxx or UNIT/degree).

                      Give  the  central meridian and scale along
              equator (1:xxxx or UNIT/degree).
              <B>-Ji</B><I>lon0/scale</I> or <B>-JI</B><I>lon0/width</I> (Sinusoidal <B>[E]</B>)
                      Give the central meridian and  scale  along
              equator (1:xxxx or UNIT/degree).
              <B>-Jk</B>[<B>f|s</B>]<I>lon0/scale</I> or <B>-JK</B>[<B>f|s</B>]<I>lon0/width</I> (Eckert IV
              (f) and VI (s) <B>[E]</B>)
                      Give the central meridian and  scale  along
              equator (1:xxxx or UNIT/degree).
              <B>-Jn</B><I>lon0/scale</I> or <B>-JN</B><I>lon0/width</I> (Robinson)
                      Give  the  central meridian and scale along
              equator (1:xxxx or UNIT/degree).
              <B>-Jr</B><I>lon0/scale</I> <B>-JR</B><I>lon0/width</I> (Winkel Tripel)
                      Give the central meridian and  scale  along
              equator (1:xxxx or UNIT/degree).
              <B>-Jv</B><I>lon0/scale</I> or <B>-JV</B><I>lon0/width</I> (Van der Grinten)
                      Give  the  central meridian and scale along
              equator (1:xxxx or UNIT/degree).
              <B>-Jw</B><I>lon0/scale</I> or <B>-JW</B><I>lon0/width</I> (Mollweide <B>[E]</B>)
                      Give the central meridian and  scale  along
              equator (1:xxxx or UNIT/degree).

              <B>NON-GEOGRAPHICAL</B> <B>PROJECTIONS:</B>

              <B>-Jp</B>[<B>a</B>]<I>scale</I>[<I>/origin</I>]  or <B>-JP</B>[<B>a</B>]<I>width</I>[<I>/origin</I>] (Lin
              ear projection  for  polar  (theta,r)  coordinates,
              optionally  insert  <B>a</B>  after  <B>-Jp</B>  [  or  <B>-JP</B>]  for
              azimuths CW from North instead  of  directions  CCW
              from  East  [default], optionally append /<I>origin</I> in
              degrees to indicate an angular offset [0]).
                      Give scale in UNIT/r-unit.
              <B>-Jx</B><I>x-scale</I>[<I>/y-scale</I>] or <B>-JX</B><I>width</I>[<I>/height</I>]
              <I>scale</I> [or <I>width</I>] can be  any  of  the  following  3
              types:
                      <B>-Jx</B><I>scale</I> - Regular linear scaling.
                      <B>-Jx</B><I>scale</I><B>l</B>  -  Take  log10  of values before
              scaling.
                      <B>-Jx</B><I>scale</I><B>p</B><I>power</I>  -  Raise  values  to  <I>power</I>
              before scaling.
              Give  <I>x-scale</I> in UNIT/x-unit and <I>y-scale</I> in UNIT/y-
              unit.  (<I>y-scale</I> = <I>x-scale</I> if  not  specified  sepa
              rately).  Use  negative  scale(s)  to  reverse  the
              direction of an axis (e.g., to have y  be  positive
              down).

              Append  a single <B>d</B> if data are geographical coordi
              nates in degrees.  Default axes lengths (see gmtde
              faults)  can be invoked using <B>-JXh</B> (for landscape);
              <B>-JXv</B> (for portrait) will swap  the  x-  and  y-axes
              lengths.   The  <B><A HREF="GMT.html">GMT</A></B> default unit for this installa
              tion is UNIT. However, you may change this by edit
              ing  your  .gmtdefaults file(s) (run gmtdefaults to
              is  user-definable by editing the .gmtdefaults file
              in your home directory. 13 commonly used ellipsoids
              and  a  spheroid are currently supported, and users
              may also specify  their  own  ellipsoid  parameters
              (see   man  gmtdefaults  for  more  details).   <B><A HREF="GMT.html">GMT</A></B>
              default  is  WGS-84.  Several  GMT  parameters  can
              affect   the  projection:  ELLIPSOID,  INTERPOLANT,
              MAP_SCALE_FACTOR, and MEASURE_UNIT; see the  <B>gmtde</B>
              <B>faults</B> man page for details.

       <B>-R</B>     <I>west,</I>  <I>east,</I> <I>south,</I> and <I>north</I> specify the Region of
              interest. To specify boundaries in degrees and min
              utes  [and  seconds],  use  the  dd:mm[:ss] format.
              Append <B>r</B> if lower left and upper right map  coordi
              nates are given instead of wesn.


</PRE>
<H2>OPTIONS</H2><PRE>
       <I>infile(s)</I>
              input file(s) with 2 or more columns. If no file(s)
              is given, mapproject will read standard input.

       <B>-C</B>     Set center of projected coordinates to  be  at  map
              projection center [Default is lower left corner].

       <B>-D</B>     Temporarily override MEASURE_UNIT and use <B>c</B> (cm), <B>i</B>
              (inch), <B>m</B> (meter), or <B>p</B> (points) instead. Cannot be
              used with <B>-F</B>.

       <B>-F</B>     Force  1:1 scaling, i.e., output (or input, see <B>-I</B>)
              data are in actual  projected  meters.  To  specify
              other  units,  append  <B>k</B> (km), <B>m</B> (mile),<B>n</B> (nautical
              mile), <B>i</B> (inch), <B>c</B> (cm), or  <B>p</B>  (points).   Without
              <B>-F</B>,  the output (or input, see <B>-I</B>) are in the units
              specified by MEASURE_UNIT (but see <B>-D</B>).

       <B>-H</B>     Input  file(s)  has  Header  record(s).  Number  of
              header records can be changed by editing your .gmt
              defaults file. If used, <B><A HREF="GMT.html">GMT</A></B>  default  is  1  header
              record.

       <B>-I</B>     Do  the  Inverse  transformation,  i.e. get (longi
              tude,latitude) from (x,y) data.

       <B>-M</B>     Multiple segment file(s). Segments are separated by
              a  special record.  For ASCII files the first char
              acter must be <I>flag</I> [Default is  '&gt;'].   For  binary
              files all fields must be NaN.

       <B>-S</B>     Suppress points that fall outside the region.

       <B>-V</B>     Selects  verbose  mode,  which  will  send progress
              reports to stderr [Default runs "silently"].
              tude,longitude)  input/output.  [Default is (longi
              tude,latitude)].  Applies to geographic coordinates
              only.

       <B>-bi</B>    Selects binary input. Append <B>s</B> for single precision
              [Default is double].  Append <I>n</I> for  the  number  of
              columns in the binary file(s).  [Default is 2 input
              columns]

       <B>-bo</B>    Selects binary output. Append <B>s</B> for  single  preci
              sion [Default is double].


</PRE>
<H2>EXAMPLES</H2><PRE>
       To  transform  a file with (longitude,latitude) into (x,y)
       positions in cm on a Mercator grid for a  given  scale  of
       0.5 cm per degree, run

       mapproject lonlatfile <B>-R</B>20/50/12/25 <B>-Jm</B>0.5<B>c</B> &gt; xyfile

       To  transform  several  2-column, binary, double precision
       files with (latitude,longitude) into  (x,y)  positions  in
       inch on a Transverse Mercator grid (central longitude 75W)
       for scale = 1:500000 and suppress those points that  would
       fall outside the map area, run

       mapproject  tracks.* <B>-R</B>-80/-70/20/40 <B>-Jt</B>-75/1:500000 <B>-:</B> <B>-S</B>
       <B>-Di</B> <B>-bo</B> <B>-bi</B><I>2</I> &gt; tmfile.b


</PRE>
<H2>RESTRICTIONS</H2><PRE>
       The rectangular input region set with <B>-R</B> will  in  general
       be  mapped  into a non-rectangular grid. Unless <B>-C</B> is set,
       the leftmost point on this grid has xvalue = 0.0, and  the
       lowermost  point  will have yvalue = 0.0. Thus, before you
       digitize a map, run the extreme  map  coordinates  through
       <B>mapproject</B>  using the appropriate scale and see what (x,y)
       values they are mapped onto. Use these values when setting
       up for digitizing in order to have the inverse transforma
       tion work correctly, or alternatively, use  <I>awk</I>  to  scale
       and shift the (x,y) values before transforming.


</PRE>
<H2>ELLIPSOIDS AND SPHEROIDS</H2><PRE>
       GMT  will use ellipsoidal formulae if they are implemented
       and the user have selected an ellipsoid as  the  reference
       shape  (see  gmtdefaults). The user needs to be aware of a
       few potential pitfalls: (1) For some projections, such  as
       Transverse  Mercator, Albers, and Lamberts conformal conic
       we use the ellipsoidal expressions when the  areas  mapped
       are  small,  and  switch to the spherical expressions (and
       substituting  the  appropriate  auxillary  latitudes)  for
       larger  maps.  The  ellipsoidal formulae are used are fol
       lows: (a) Transverse Mercator: When all points are  within
       10 degrees of central meridian, (b) Conic projections when
       meridian. (2) When you are trying to match some historical
       data (e.g., coordinates obtained with a certain projection
       and a certain reference ellipsoid) you may find  that  <A HREF="GMT.html">GMT</A>
       gives  results  that  are  slightly  different. One likely
       source of this mismatch is that older  calculations  often
       used less significant digits. For instance, Snyder's exam
       ples often use the Clarke 1866 ellipsoid (defined  by  him
       as'  having  a flattening f = 1/294.98). From f we get the
       eccentricity squared to be 0.00676862818 (this is what <A HREF="GMT.html">GMT</A>
       uses),  while  Snyder rounds off and uses 0.00676866. This
       difference can give discrepancies of several 10 of cm.  If
       you  need  to  reproduce  coordinates  projected with this
       slightly different eccentricity, you should  specify  your
       own ellipsoid with the same parameters as Clarke 1866, but
       with f = 1/294.97861076.


</PRE>
<H2>SEE ALSO</H2><PRE>
       <I><A HREF="gmtdefaults.html">gmtdefaults</A></I>(l), <I>gmt</I>(l), <I><A HREF="project.html">project</A></I>(l)


</PRE>
<H2>REFERENCES</H2><PRE>
       Snyder, J. P., 1987, Map Projections - A  Working  Manual,
       U.S. Geological Survey Prof. Paper 1395.






























</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>
<body bgcolor="#ffffff">