1PSMASK(1)                             GMT                            PSMASK(1)
2
3
4

NAME

6       psmask - Use data tables to clip or mask map areas with no coverage
7

SYNOPSIS

9       psmask [ table ]
10        -Iincrement
11        -Jparameters
12        -Rregion [  -B[p|s]parameters ] [  -Ddumpfile ] [  -F[l|r] ] [  -Gfill
13       ] [  -Jz|Zparameters ] [  -K ] [  -L[+|-]nodegrid ] [  -N ] [  -O  ]  [
14       -P  ]  [   -Qcut  ] [  -Ssearch_radius[unit] ] [  -T ] [  -U[stamp] ] [
15       -V[level] ] [  -Xx_offset ] [  -Yy_offset ] [ -bibinary ] [ -dinodata ]
16       [  -eregexp ] [ -hheaders ] [ -iflags ] [ -pflags ] [ -r ] [ -ttransp ]
17       [ -:[i|o] ]
18
19       psmask -C [ -K ] [ -O ]
20
21       Note: No space is allowed between the option flag  and  the  associated
22       arguments.
23

DESCRIPTION

25       psmask  reads a (x,y,z) file [or standard input] and uses this informa‐
26       tion to find out which grid cells are reliable. Only grid  cells  which
27       have one or more data points are considered reliable. As an option, you
28       may specify a radius of influence. Then, all grid cells that are within
29       radius of a data point are considered reliable.  Furthermore, an option
30       is provided to reverse the sense of the test.  Having found  the  reli‐
31       able/not  reliable points, psmask will either paint tiles to mask these
32       nodes (with the -T switch), or use contouring to create  polygons  that
33       will  clip  out regions of no interest.  When clipping is initiated, it
34       will stay in effect until turned off by a second call to  psmask  using
35       the -C option.
36

REQUIRED

38       -Ixinc[unit][+e|n][/yinc[unit][+e|n]]
39              x_inc  [and  optionally  y_inc] is the grid spacing. Optionally,
40              append a suffix modifier.  Geographical  (degrees)  coordinates:
41              Append  m  to indicate arc minutes or s to indicate arc seconds.
42              If one of the units e, f, k, M, n or u is appended instead,  the
43              increment  is assumed to be given in meter, foot, km, Mile, nau‐
44              tical mile or US survey foot, respectively,  and  will  be  con‐
45              verted  to  the equivalent degrees longitude at the middle lati‐
46              tude of the region (the conversion depends  on  PROJ_ELLIPSOID).
47              If  y_inc is given but set to 0 it will be reset equal to x_inc;
48              otherwise it will be converted to degrees latitude. All  coordi‐
49              nates:  If +e is appended then the corresponding max x (east) or
50              y (north) may be slightly adjusted  to  fit  exactly  the  given
51              increment  [by default the increment may be adjusted slightly to
52              fit the given domain]. Finally, instead of giving  an  increment
53              you  may  specify the number of nodes desired by appending +n to
54              the supplied integer argument; the increment  is  then  recalcu‐
55              lated  from  the  number  of nodes and the domain. The resulting
56              increment value depends on whether you  have  selected  a  grid‐
57              line-registered  or  pixel-registered grid; see App-file-formats
58              for details. Note: if -Rgrdfile is used then  the  grid  spacing
59              has already been initialized; use -I to override the values.
60
61       -Jparameters (more ...)
62              Select map projection. [Not mandatory when -D].
63
64       -Rxmin/xmax/ymin/ymax[+r][+uunit] (more ...)
65              Specify the region of interest.
66
67       For perspective view p, optionally append /zmin/zmax. (more ...)
68

OPTIONAL ARGUMENTS

70       table  One  or  more ASCII (or binary, see -bi[ncols][type]) data table
71              file(s) holding a number of data columns. If no tables are given
72              then we read from standard input.
73
74       -B[p|s]parameters (more ...)
75              Set map boundary frame and axes attributes.
76
77       -C     Mark end of existing clip path. No input file is needed. Implic‐
78              itly sets -O. Also supply -X and -Y settings if you  have  moved
79              since the clip started.
80
81       -Ddumpfile
82              Dump  the  (x,y)  coordinates of each clipping polygon to one or
83              more output files (or stdout if template is not given). No plot‐
84              ting  will  take place. If template contains the C-format speci‐
85              fier %d (including modifications like %05d) then  polygons  will
86              be  written to different files; otherwise all polygons are writ‐
87              ten to the specified file (template). The files are ASCII unless
88              -bo  is  used.  See -Q to exclude small polygons from considera‐
89              tion.
90
91       -F[l|r]
92              Force clip contours (polygons)  to  be  oriented  so  that  data
93              points are to the left (-Fl [Default]) or right (-Fr) as we move
94              along the perimeter [Default is arbitrary orientation]. Requires
95              -D.
96
97       -Gfill Paint the clip polygons (or tiles) with a selected fill [Default
98              is no fill].
99
100       -Jz|Zparameters (more ...)
101              Set z-axis scaling; same syntax as -Jx.
102
103       -K (more ...)
104              Do not finalize the PostScript plot.
105
106       -L[+|-]nodegrid
107              Save the internal grid with ones (data constraint) and zeros (no
108              data)  to the named nodegrid [no grid saved].  Use L+ to convert
109              the no data flags to NaNs before writing the grid, while L- will
110              instead convert the data flags to NaNs.
111
112       -N     Invert  the sense of the test, i.e., clip regions where there is
113              data coverage.
114
115       -O (more ...)
116              Append to existing PostScript plot.
117
118       -P (more ...)
119              Select "Portrait" plot orientation.
120
121       -Q     Do not dump polygons with less than cut number of points  [Dumps
122              all polygons]. Only applicable if -D has been specified.
123
124       -Ssearch_radius[unit]
125              Sets  radius  of  influence.  Grid nodes within radius of a data
126              point are considered reliable. [Default is 0, which  means  that
127              only grid cells with data in them are reliable]. Append the dis‐
128              tance unit (see UNITS).
129
130       -T     Plot tiles instead of clip polygons. Use -G to set tile color or
131              pattern. Cannot be used with -D.
132
133       -U[[just]/dx/dy/][c|label] (more ...)
134              Draw GMT time stamp logo on plot.
135
136       -V[level] (more ...)
137              Select verbosity level [c].
138
139       -X[a|c|f|r][x-shift[u]]
140
141       -Y[a|c|f|r][y-shift[u]] (more ...)
142              Shift plot origin.
143
144       -bi[ncols][t] (more ...)
145              Select native binary input. [Default is 2 input columns].
146
147       -dinodata (more ...)
148              Replace input columns that equal nodata with NaN.
149
150       -e[~]"pattern" | -e[~]/regexp/[i] (more ...)
151              Only accept data records that match the given pattern.
152
153       -h[i|o][n][+c][+d][+rremark][+rtitle] (more ...)
154              Skip or produce header record(s). Not used with binary data.
155
156       -icols[+l][+sscale][+ooffset][,...] (more ...)
157              Select input columns and transformations (0 is first column).
158
159       -p[x|y|z]azim[/elev[/zlevel]][+wlon0/lat0[/z0]][+vx0/y0] (more ...)
160              Select perspective view.
161
162       -r (more ...)
163              Set pixel node registration [gridline].
164
165       -t[transp] (more ...)
166              Set PDF transparency level in percent.
167
168       -:[i|o] (more ...)
169              Swap 1st and 2nd column on input and/or output.
170
171       -^ or just -
172              Print  a  short  message  about  the syntax of the command, then
173              exits (NOTE: on Windows just use -).
174
175       -+ or just +
176              Print an extensive usage (help) message, including the  explana‐
177              tion  of  any  module-specific  option  (but  not the GMT common
178              options), then exits.
179
180       -? or no arguments
181              Print a complete usage (help) message, including the explanation
182              of all options, then exits.
183

UNITS

185       For  map distance unit, append unit d for arc degree, m for arc minute,
186       and s for arc second, or e for meter [Default], f for foot, k for km, M
187       for  statute  mile,  n  for nautical mile, and u for US survey foot. By
188       default we compute such distances using a spherical approximation  with
189       great  circles.  Prepend - to a distance (or the unit is no distance is
190       given) to perform "Flat Earth" calculations (quicker but less accurate)
191       or  prepend  +  to perform exact geodesic calculations (slower but more
192       accurate).
193

EXAMPLES

195       To make an overlay PostScript file that will mask out the regions of  a
196       contour map where there is no control data using clip polygons, use:
197
198              gmt psmask africa_grav.xyg -R20/40/20/40 -I5m -JM10i -O -K > mask.ps
199
200       We  do it again, but this time we wish to save the clipping polygons to
201       file all_pols.txt:
202
203              gmt psmask africa_grav.xyg -R20/40/20/40 -I5m -Dall_pols.txt
204
205       A repeat of the first example but this time we use white tiling:
206
207              gmt psmask africa_grav.xyg -R20/40/20/40 -I5m -JM10i -T -O -K -Gwhite > mask.ps
208

SEE ALSO

210       gmt, gmtcolors, grdmask, surface, psbasemap, psclip
211
213       2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
214
215
216
217
2185.4.5                            Feb 24, 2019                        PSMASK(1)
Impressum