1PSMASK(1) Generic Mapping Tools PSMASK(1)
2
3
4
6 psmask - To clip or mask areas of no data on a map
7
9 psmask [xyzfile] -Ixinc[unit][=|+][/yinc[unit][=|+]] -Jparameters
10 -Rwest/east/south/north[r] [ -B[p|s]parameters ] [ -Ddumpfile ] [ -Eaz‐
11 imuth/elevation ] [ -F ] [ -Gfill ] [ -H[i][nrec] ] [ -K ] [ -M[flag] ]
12 [ -N ] [ -O ] [ -P ] [ -Ssearch_radius[m|c|k|K] ] [ -T ] [
13 -U[just/dx/dy/][c|label] ] [ -V ] [ -X[a|c|r][x-shift[u]] ] [
14 -Y[a|c|r][y-shift[u]] ] [ -ccopies ] [ -:[i|o] ] [
15 -bi[s|S|d|D[ncol]|c[var1/...]] ]
16
17 psmask -C [ -K ] [ -O ]
18
20 psmask reads a (x,y,z) file [or standard input] and uses this informa‐
21 tion to find out which grid cells are reliable. Only gridcells which
22 have one or more data points are considered reliable. As an option,
23 you may specify a radius of influence. Then, all gridcells that are
24 within radius of a data point are considered reliable. Furthermore, an
25 option is provided to reverse the sense of the test. Having found the
26 reliable/not reliable points, psmask will either paint tiles to mask
27 these nodes (with the -T switch), or use contouring to create polygons
28 that will clip out regions of no interest. When clipping is initiated,
29 it will stay in effect until turned off by a second call to psmask
30 using the -C option.
31
32 xyzfile
33 File with (x,y,z) values (e.g., that was used to run surface).
34 If no file is given, standard input is read. For binary files,
35 see -b.
36
37 -I x_inc [and optionally y_inc] is the grid spacing. Optionally,
38 append a suffix modifier. Geographical (degrees) coordinates:
39 Append m to indicate arc minutes or c to indicate arc seconds.
40 If one of the units e, k, i, or n is appended instead, the
41 increment is assumed to be given in meter, km, miles, or nauti‐
42 cal miles, respectively, and will be converted to the equivalent
43 degrees longitude at the middle latitude of the region (the con‐
44 version depends on ELLIPSOID). If /y_inc is given but set to 0
45 it will be reset equal to x_inc; otherwise it will be converted
46 to degrees latitude. All coordinates: If = is appended then the
47 corresponding max x (east) or y (north) may be slightly adjusted
48 to fit exactly the given increment [by default the increment may
49 be adjusted slightly to fit the given domain]. Finally, instead
50 of giving an increment you may specify the number of nodes
51 desired by appending + to the supplied integer argument; the
52 increment is then recalculated from the number of nodes and the
53 domain. The resulting increment value depends on whether you
54 have selected a gridline-registered or pixel-registered grid;
55 see Appendix B for details.
56
57 -J Selects the map projection. Scale is UNIT/degree, 1:xxxxx, or
58 width in UNIT (upper case modifier). UNIT is cm, inch, or m,
59 depending on the MEASURE_UNIT setting in .gmtdefaults4, but this
60 can be overridden on the command line by appending c, i, or m to
61 the scale/width value. When central meridian is optional,
62 default is center of longitude range on -R option. Default
63 standard parallel is the equator. For map height, max dimen‐
64 sion, or min dimension, append h, +, or - to the width, respec‐
65 tively.
66 More details can be found in the psbasemap man pages.
67
68 CYLINDRICAL PROJECTIONS:
69
70 -Jclon0/lat0/scale (Cassini)
71 -Jcyl_stere/[lon0/[lat0/]]scale (Cylindrical Stereographic)
72 -Jj[lon0/]scale (Miller)
73 -Jm[lon0/[lat0/]]scale (Mercator)
74 -Jmlon0/lat0/scale (Mercator - Give meridian and standard paral‐
75 lel)
76 -Jo[a]lon0/lat0/azimuth/scale (Oblique Mercator - point and
77 azimuth)
78 -Jo[b]lon0/lat0/lon1/lat1/scale (Oblique Mercator - two points)
79 -Joclon0/lat0/lonp/latp/scale (Oblique Mercator - point and
80 pole)
81 -Jq[lon0/[lat0/]]scale (Cylindrical Equidistant)
82 -Jtlon0/[lat0/]scale (TM - Transverse Mercator)
83 -Juzone/scale (UTM - Universal Transverse Mercator)
84 -Jy[lon0/[lat0/]]scale (Cylindrical Equal-Area)
85
86 CONIC PROJECTIONS:
87
88 -Jblon0/lat0/lat1/lat2/scale (Albers)
89 -Jdlon0/lat0/lat1/lat2/scale (Conic Equidistant)
90 -Jllon0/lat0/lat1/lat2/scale (Lambert Conic Conformal)
91
92 AZIMUTHAL PROJECTIONS:
93
94 -Jalon0/lat0[/horizon]/scale (Lambert Azimuthal Equal-Area)
95 -Jelon0/lat0[/horizon]/scale (Azimuthal Equidistant)
96 -Jflon0/lat0[/horizon]/scale (Gnomonic)
97 -Jglon0/lat0[/horizon]/scale (Orthographic)
98 -Jglon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale
99 (General Perspective).
100 -Jslon0/lat0[/horizon][/slat]/scale (General Stereographic)
101
102 MISCELLANEOUS PROJECTIONS:
103
104 -Jh[lon0/]scale (Hammer)
105 -Ji[lon0/]scale (Sinusoidal)
106 -Jkf[lon0/]scale (Eckert IV)
107 -Jk[s][lon0/]scale (Eckert IV)
108 -Jn[lon0/]scale (Robinson)
109 -Jr[lon0/]scale (Winkel Tripel)
110 -Jv[lon0/]scale (Van der Grinten)
111 -Jw[lon0/]scale (Mollweide)
112
113 NON-GEOGRAPHICAL PROJECTIONS:
114
115 -Jp[a]scale[/origin][r|z] (Polar coordinates (theta,r))
116 -Jxx-scale[d|l|ppow|t|T][/y-scale[d|l|ppow|t|T]] (Linear, log,
117 and power scaling)
118
119 -R xmin, xmax, ymin, and ymax specify the Region of interest. For
120 geographic regions, these limits correspond to west, east,
121 south, and north and you may specify them in decimal degrees or
122 in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left
123 and upper right map coordinates are given instead of w/e/s/n.
124 The two shorthands -Rg and -Rd stand for global domain (0/360
125 and -180/+180 in longitude respectively, with -90/+90 in lati‐
126 tude). For calendar time coordinates you may either give (a)
127 relative time (relative to the selected TIME_EPOCH and in the
128 selected TIME_UNIT; append t to -JX|x), or (b) absolute time of
129 the form [date]T[clock] (append T to -JX|x). At least one of
130 date and clock must be present; the T is always required. The
131 date string must be of the form [-]yyyy[-mm[-dd]] (Gregorian
132 calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock
133 string must be of the form hh:mm:ss[.xxx]. The use of delim‐
134 iters and their type and positions must be exactly as indicated
135 (however, input, output and plot formats are customizable; see
136 gmtdefaults).
137
139 No space between the option flag and the associated arguments.
140
141 -B Sets map boundary annotation and tickmark intervals; see the
142 psbasemap man page for all the details.
143
144 -C Mark end of existing clip path. No input file is needed.
145 Implicitly sets -O.
146
147 -D Dumps out the resulting clipping polygons to disk. Ignored if
148 -T is set. If no dumpprefix is given we use mask (Files will be
149 called mask_*.d).
150
151 -E Sets the viewpoint's azimuth and elevation for perspective plots
152 [180/90].
153
154 -F Force pixel node registration [Default is gridline registra‐
155 tion]. (Node registrations are defined in GMT Cookbook Appendix
156 B on grid file formats.)
157
158 -G Paint the clip polygons (or tiles) with a selected fill [Default
159 is no fill]. (See SPECIFYING FILL below).
160
161 -H Input file(s) has Header record(s). Number of header records
162 can be changed by editing your .gmtdefaults4 file. If used, GMT
163 default is 1 header record. Use -Hi if only input data should
164 have header records [Default will write out header records if
165 the input data have them]. Blank lines and lines starting with #
166 are always skipped. Not used with binary data.
167
168 -K More PostScript code will be appended later [Default terminates
169 the plot system].
170
171 -M Multiple segment file(s). Segments are separated by a special
172 record. For ASCII files the first character must be flag
173 [Default is '>']. For binary files all fields must be NaN and
174 -b must set the number of output columns explicitly. By default
175 the -M setting applies to both input and output. Use -Mi and
176 -Mo to give separate settings.
177
178 -N Invert the sense of the test, i.e. clip regions where there is
179 data coverage.
180
181 -O Selects Overlay plot mode [Default initializes a new plot sys‐
182 tem].
183
184 -P Selects Portrait plotting mode [Default is Landscape, see gmtde‐
185 faults to change this].
186
187 -S Sets radius of influence. Grid nodes within radius of a data
188 point are considered reliable. [Default is 0, which means that
189 only grid cells with data in them are reliable]. Append m to
190 indicate minutes or c to indicate seconds. Append k to indicate
191 km (implies -R and -I are in degrees, and we will use a fast
192 flat Earth approximation to calculate distance). For more accu‐
193 racy, use uppercase K if distances should be calculated along
194 geodesics. However, if the current ELLIPSOID is set to Sphere
195 then spherical great circle calculations are used.
196
197 -T Plot tiles instead of clip polygons. Use -G to set tile color
198 or pattern.
199
200 -U Draw Unix System time stamp on plot. By adding just/dx/dy/, the
201 user may specify the justification of the stamp and where the
202 stamp should fall on the page relative to lower left corner of
203 the plot. For example, BL/0/0 will align the lower left corner
204 of the time stamp with the lower left corner of the plot.
205 Optionally, append a label, or c (which will plot the command
206 string.). The GMT parameters UNIX_TIME, UNIX_TIME_POS, and
207 UNIX_TIME_FORMAT can affect the appearance; see the gmtdefaults
208 man page for details. The time string will be in the locale set
209 by the environment variable TZ (generally local time).
210
211 -V Selects verbose mode, which will send progress reports to stderr
212 [Default runs "silently"].
213
214 -X -Y Shift plot origin relative to the current origin by (x-shift,y-
215 shift) and optionally append the length unit (c, i, m, p). You
216 can prepend a to shift the origin back to the original position
217 after plotting, or prepend r [Default] to reset the current
218 origin to the new location. If -O is used then the default (x-
219 shift,y-shift) is (0,0), otherwise it is (r1i, r1i) or (r2.5c,
220 r2.5c). Alternatively, give c to align the center coordinate (x
221 or y) of the plot with the center of the page based on current
222 page size.
223
224 -: Toggles between (longitude,latitude) and (latitude,longitude)
225 input and/or output. [Default is (longitude,latitude)]. Append
226 i to select input only or o to select output only. [Default
227 affects both].
228
229 -bi Selects binary input. Append s for single precision [Default is
230 d (double)]. Uppercase S or D will force byte-swapping.
231 Optionally, append ncol, the number of columns in your binary
232 input file if it exceeds the columns needed by the program. Or
233 append c if the input file is netCDF. Optionally, append
234 var1/var2/... to specify the variables to be read. [Default is
235 2 input columns].
236
237 -c Specifies the number of plot copies. [Default is 1].
238
239 SPECIFYING FILL
240 fill The attribute fill specifies the solid shade or solid color (see
241 SPECIFYING COLOR below) or the pattern used for filling poly‐
242 gons. Patterns are specified as pdpi/pattern, where pattern
243 gives the number of the built-in pattern (1-90) or the name of a
244 Sun 1-, 8-, or 24-bit raster file. The dpi sets the resolution
245 of the image. For 1-bit rasters: use Pdpi/pattern for inverse
246 video, or append :Fcolor[B[color]] to specify fore- and back‐
247 ground colors (use color = - for transparency). See GMT Cook‐
248 book & Technical Reference Appendix E for information on indi‐
249 vidual patterns.
250
251 SPECIFYING COLOR
252 color The color of lines, areas and patterns can be specified by a
253 valid color name; by a grey shade (in the range 0-255); by a
254 decimal color code (r/g/b, each in range 0-255; h-s-v, ranges
255 0-360, 0-1, 0-1; or c/m/y/k, each in range 0-1); or by a hexa‐
256 decimal color code (#rrggbb, as used in HTML). See the gmtcol‐
257 ors manpage for more information and a full list of color names.
258
260 To make an overlay PostScript file that will mask out the regions of a
261 contour map where there is no control data using clip polygons, use:
262
263 psmask africa_grav.xyg -R20/40/20/40 -I5m -JM10i -O -K > mask.ps
264
265 The same example but this time we use white tiling:
266
267 psmask africa_grav.xyg -R20/40/20/40 -I5m -JM10i -T -O -K -Gwhite >
268 mask.ps
269
271 GMT(1), grdmask(1), surface(1), psbasemap(1), psclip(1)
272
273
274
275GMT 4.3.1 15 May 2008 PSMASK(1)