File: gmtselect.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 (237 lines) | stat: -rw-r--r-- 11,109 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
<HTML>
<HEAD>
<TITLE>gmtselect</TITLE>
</HEAD>
<BODY>
<H1>gmtselect</H1>
<HR>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
       gmtselect  - Select data subsets based on multiple spatial
       criteria


</PRE>
<H2>SYNOPSIS</H2><PRE>
       <B>gmtselect</B> [ <I>infiles</I> ] [ <B>-A</B><I>min</I><B>_</B><I>area</I>[/<I>min</I><B>_</B><I>level/max</I><B>_</B><I>level</I>] ]
       [  <B>-C</B>[<B>f</B>]<I>dist/ptfile</I> ] [ <B>-D</B><I>resolution</I> ] [ <B>-F</B><I>polygonfile</I> ] [
       <B>-H</B>[<I>nrec</I>] ] [ <B>-I</B>[<B>cflrs</B>] ] [ <B>-J</B><I>parameters</I> ] [  <B>-L</B>[<I>dist/line</I>
       <I>file</I>]   ]   [   <B>-M</B>[<I>flag</I>]   ]   [   <B>-N</B><I>maskvalues</I>[<B>o</B>]   ]   [
       <B>-R</B><I>west/east/south/north</I>[<B>r</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>gmtselect</B>  is  a  filter  that reads (longitude, latitude)
       positions from the first 2 columns of <I>infiles</I> [or standard
       input]  and  uses a combination of 1-5 criteria to pass or
       reject the records.  Records  can  be  selected  based  on
       whether or not they are 1) inside a rectangular region (<B>-R</B>
       [and <B>-J</B>]), 2) within <I>dist</I> km of any point  in  <I>ptfile</I>,  3)
       within  <I>dist</I>  km of any line in <I>linefile</I>, 4) inside one of
       the polygons in the <I>polygonfile</I>, and 5) inside  geographi
       cal  features  (based  on  coastlines).   The sense of the
       tests can be reversed for each  of  these  5  criteria  by
       using  the <B>-I</B> option.  See option <B>-:</B> on how to read (lati
       tude,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>
              ASCII (or binary, see<B>-b</B>) data file(s) to  be  oper
              ated on. If not given, standard input is read.


</PRE>
<H2>OPTIONS</H2><PRE>
       <B>-A</B>     Ignored  unless  <B>-N</B>  is  set. Geographical features
              with an area smaller than <I>min</I><B>_</B><I>area</I> in  km^2  or  of
              hierarchical  level that is lower than <I>min</I><B>_</B><I>level</I> or
              higher than <I>max</I><B>_</B><I>level</I> will be ignored  [Default  is
              0/4  (all  features)].  See DATABASE INFORMATION in
              the <B><A HREF="pscoast.html">pscoast</A></B> man-pages for more details.

       <B>-C</B>     Pass all records whose location is within  <I>dist</I>  km
              of  any  of  the  points in <I>ptfile</I>. If <I>dist</I> is zero
              then the  3rd  column  of  <I>ptfile</I>  must  have  each
              point's  individual radius of influence.  Prepend <B>f</B>
              to indicate you want approximate flat'  earth  dis
              tance calculations (faster) than exact great circle
              calculations (slower).

       <B>-D</B>     Ignored unless <B>-N</B> is set. Selects the resolution of
              the  coastline  data  set  to  use ((<B>f</B>)ull, (<B>h</B>)igh,
              (<B>i</B>)ntermediate, (<B>l</B>)ow, or (<B>c</B>)rude). The  resolution
              drops  off  by  ~80% between data sets. [Default is
              inside [or outside] when a different resolution  is
              selected.

       <B>-F</B>     Pass  all  records  whose location is within one of
              the closed polygons in  the  multiple-segment  file
              <I>polygonfile</I>.

       <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>     Reverses the sense of the test for each of the cri
              teria specified:
                      <B>c</B>  select  records  NOT  inside any point's
              circle of influence.'
                      <B>f</B> select records  NOT  inside  any  of  the
              polygons.
                      <B>l</B>  select  records NOT within the specified
              distance of any line.
                      <B>r</B> select records NOT inside  the  specified
              rectangular region.
                      <B>s</B>  select  records NOT considered inside as
              specified by <B>-A,</B> <B>-D,</B> <B>-N</B>.

       <B>-J</B>     Selects the map projection. Scale  is  UNIT/degree,
              1:xxxxx,  or  width  in UNIT (upper case modifier).
              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 the  c,
              i, or m to the scale/width value.

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

              <B>-Jc</B><I>lon0/lat0/scale</I> (Cassini)
              <B>-Jj</B><I>lon0/scale</I> (Miller)
              <B>-Jm</B><I>scale</I>  (Mercator - Greenwich and Equator as ori
              gin)
              <B>-Jm</B><I>lon0/lat0/scale</I> (Mercator -  Give  meridian  and
              standard parallel)
              <B>-Joa</B><I>lon0/lat0/azimuth/scale</I>   (Oblique  Mercator  -
              point and azimuth)
              <B>-Job</B><I>lon0/lat0/lon1/lat1/scale</I> (Oblique  Mercator  -
              two points)
              <B>-Joc</B><I>lon0/lat0/lonp/latp/scale</I>  (Oblique  Mercator -
              point and pole)
              <B>-Jq</B><I>lon0/scale</I> (Equidistant  Cylindrical  Projection
              (Plate Carree))
              <B>-Jt</B><I>lon0/scale</I> (TM - Transverse Mercator, with Equa
              tor as y = 0)
              <B>-Jt</B><I>lon0/lat0/scale</I> (TM - Transverse  Mercator,  set
              origin)

              <B>AZIMUTHAL</B> <B>PROJECTIONS:</B>

              <B>-Ja</B><I>lon0/lat0/scale</I> (Lambert).
              <B>-Je</B><I>lon0/lat0/scale</I> (Equidistant).
              <B>-Jf</B><I>lon0/lat0/horizon/scale</I> (Gnomonic).
              <B>-Jg</B><I>lon0/lat0/scale</I> (Orthographic).
              <B>-Js</B><I>lon0/lat0/</I>[<I>slat/</I>]<I>scale</I> (General Stereographic)

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

              <B>-Jb</B><I>lon0/lat0/lat1/lat2/scale</I> (Albers)
              <B>-Jd</B><I>lon0/lat0/lat1/lat2/scale</I> (Equidistant)
              <B>-Jl</B><I>lon0/lat0/lat1/lat2/scale</I> (Lambert)

              <B>MISCELLANEOUS</B> <B>PROJECTIONS:</B>

              <B>-Jh</B><I>lon0/scale</I> (Hammer)
              <B>-Ji</B><I>lon0/scale</I> (Sinusoidal)
              <B>-Jk</B>[<B>f|s</B>]<I>lon0/scale</I> (Eckert IV (f) and VI (s))
              <B>-Jn</B><I>lon0/scale</I> (Robinson)
              <B>-Jr</B><I>lon0/scale</I> (Winkel Tripel)
              <B>-Jv</B><I>lon0/scale</I> (Van der Grinten)
              <B>-Jw</B><I>lon0/scale</I> (Mollweide)

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

              <B>-Jp</B>[<B>a</B>]<I>scale</I>[<I>/origin</I>] (polar (theta,r)  coordinates,
              optional <B>a</B> for azimuths and offset theta [0])
              <B>-Jx</B><I>x-scale</I>[<B>l|p</B><I>pow</I>][<I>/y-scale</I>[<B>l|p</B><I>pow</I>]]  (Linear, log,
              and power scaling)
              More details can be found  in  the  <B><A HREF="psbasemap.html">psbasemap</A></B>  man
              pages.

       <B>-L</B>     Pass  all  records whose location is within <I>dist</I> km
              of any of the line segments in the multiple-segment
              file  <I>linefile</I>. If <I>dist</I> is zero then the 2nd column
              of each sub-header in the  <I>ptfile</I>  must  have  each
              lines's  individual  distance  value.'  If no argu
              ments are given, it means instead that the x column
              contains  longitudes,  which  may  differ  from the
              region in <B>-R</B> by [multiples of] 360 degrees [Default
              assumes no periodicity]

       <B>-M</B>     Multiple  segment file. Segments are separated by a
              record whose first character is <I>flag</I>.  [Default  is
              '&gt;'].

       <B>-N</B>     Pass all records whose location is inside specified
              geographical features.  Specify if  records  should
              be <B>s</B>kipped or <B>k</B>kept using 1 of 2 formats:
                      <B>-N</B><I>wet/dry</I>.

              aries be considered outside the feature [Default is
              inside].  [Default  is s/k/s/k/s (i.e., s/k), which
              passes all points on dry land].

       <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.  If no map projec
              tion is supplied we implicitly set <B>-Jx</B>1.

       <B>-V</B>     Selects  verbose  mode,  which  will  send progress
              reports to stderr [Default runs "silently"].

       <B>-:</B>     Toggles  between  (longitude,latitude)  and  (lati
              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 extract the subset of data set that is within 300 km of
       any of the points in pts.d but more than 100 km away  from
       the lines in lines.d, try

       gmtselect lonlatfile <B>-Jd</B>1d <B>-C</B>300/pts.d <B>-L</B>100/lines.d <B>-Il</B> &gt;
       subset

       Here, you must specify a mapprojection so that  knows  you
       are  giving  it  geographical data (otherwise 300 would be
       interpreted as Cartesian distance in x-y units instead  of
       km).   To  keep all points in data.d except those on land,
       as determined by the high-resolution coastlines, try

       gmtselect data.d <B>-R</B>120/121/22/24 <B>-Dh</B> <B>-Ns</B>/<B>k</B> &gt; subset


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







</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">