1PSCLIP(1)                    Generic Mapping Tools                   PSCLIP(1)
2
3
4

NAME

6       psclip - To set up polygonal clip paths
7

SYNOPSIS

9       psclip xyfiles -Jparameters -Rwest/east/south/north[r] [ -B[p|s]parame‐
10       ters ] [ -Eazim/elev ] [ -K ] [ -N ] [ -M[flag] ] [  -O  ]  [  -P  ]  [
11       -U[just/dx/dy/][c|label]   ]   [  -V  ]  [  -X[a|c|r][x-shift[u]]  ]  [
12       -Y[a|c|r][y-shift[u]] ]  [  -Zzlevel  ]  [  -ccopies]  [  -:[i|o]  ]  [
13       -bi[s|S|d|D[ncol]|c[var1/...]] ] [ -fcolinfo ]
14
15       psclip -C [ -K ] [ -O ]
16

DESCRIPTION

18       psclip  reads (x,y) file(s) [or standard input] and draws polygons that
19       are activated as clipping paths.  Several files may be read  to  create
20       complex  paths  consisting  of  several non-connecting segments.  As an
21       option (-N), the user may choose to reverse the sense of  what  is  the
22       inside and outside of the paths.  After subsequent plotting, which will
23       be clipped against these paths, the clipping may be deactivated by run‐
24       ning psclip a second time with the -C option only.
25
26       xyfiles
27              ASCII  [or  binary,  see  -b] file(s) with (x,y) values for clip
28              polygons.  If no files are given, the standard input is read.
29
30       -C     Mark end of existing clip path.  No  input  file  or  projection
31              information are needed.
32
33       -J     Selects  the  map  projection. Scale is UNIT/degree, 1:xxxxx, or
34              width in UNIT (upper case modifier).  UNIT is cm,  inch,  or  m,
35              depending on the MEASURE_UNIT setting in .gmtdefaults4, but this
36              can be overridden on the command line by appending c, i, or m to
37              the  scale/width  value.   When  central  meridian  is optional,
38              default is center of longitude  range  on  -R  option.   Default
39              standard  parallel  is  the equator.  For map height, max dimen‐
40              sion, or min dimension, append h, +, or - to the width,  respec‐
41              tively.
42              More details can be found in the psbasemap man pages.
43
44              CYLINDRICAL PROJECTIONS:
45
46              -Jclon0/lat0/scale (Cassini)
47              -Jcyl_stere/[lon0/[lat0/]]scale (Cylindrical Stereographic)
48              -Jj[lon0/]scale (Miller)
49              -Jm[lon0/[lat0/]]scale (Mercator)
50              -Jmlon0/lat0/scale (Mercator - Give meridian and standard paral‐
51              lel)
52              -Jo[a]lon0/lat0/azimuth/scale  (Oblique  Mercator  -  point  and
53              azimuth)
54              -Jo[b]lon0/lat0/lon1/lat1/scale (Oblique Mercator - two points)
55              -Joclon0/lat0/lonp/latp/scale  (Oblique  Mercator  -  point  and
56              pole)
57              -Jq[lon0/[lat0/]]scale (Cylindrical Equidistant)
58              -Jtlon0/[lat0/]scale (TM - Transverse Mercator)
59              -Juzone/scale (UTM - Universal Transverse Mercator)
60              -Jy[lon0/[lat0/]]scale (Cylindrical Equal-Area)
61
62              CONIC PROJECTIONS:
63
64              -Jblon0/lat0/lat1/lat2/scale (Albers)
65              -Jdlon0/lat0/lat1/lat2/scale (Conic Equidistant)
66              -Jllon0/lat0/lat1/lat2/scale (Lambert Conic Conformal)
67
68              AZIMUTHAL PROJECTIONS:
69
70              -Jalon0/lat0[/horizon]/scale (Lambert Azimuthal Equal-Area)
71              -Jelon0/lat0[/horizon]/scale (Azimuthal Equidistant)
72              -Jflon0/lat0[/horizon]/scale (Gnomonic)
73              -Jglon0/lat0[/horizon]/scale (Orthographic)
74              -Jglon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale
75              (General Perspective).
76              -Jslon0/lat0[/horizon][/slat]/scale (General Stereographic)
77
78              MISCELLANEOUS PROJECTIONS:
79
80              -Jh[lon0/]scale (Hammer)
81              -Ji[lon0/]scale (Sinusoidal)
82              -Jkf[lon0/]scale (Eckert IV)
83              -Jk[s][lon0/]scale (Eckert IV)
84              -Jn[lon0/]scale (Robinson)
85              -Jr[lon0/]scale (Winkel Tripel)
86              -Jv[lon0/]scale (Van der Grinten)
87              -Jw[lon0/]scale (Mollweide)
88
89              NON-GEOGRAPHICAL PROJECTIONS:
90
91              -Jp[a]scale[/origin][r|z] (Polar coordinates (theta,r))
92              -Jxx-scale[d|l|ppow|t|T][/y-scale[d|l|ppow|t|T]]  (Linear,  log,
93              and power scaling)
94
95       -R     xmin, xmax, ymin, and ymax specify the Region of interest.   For
96              geographic  regions,  these  limits  correspond  to  west, east,
97              south, and north and you may specify them in decimal degrees  or
98              in  [+-]dd:mm[:ss.xxx][W|E|S|N]  format.  Append r if lower left
99              and upper right map coordinates are given  instead  of  w/e/s/n.
100              The  two  shorthands  -Rg and -Rd stand for global domain (0/360
101              and -180/+180 in longitude respectively, with -90/+90  in  lati‐
102              tude).   For  calendar  time coordinates you may either give (a)
103              relative time (relative to the selected TIME_EPOCH  and  in  the
104              selected  TIME_UNIT; append t to -JX|x), or (b) absolute time of
105              the form [date]T[clock] (append T to -JX|x).  At  least  one  of
106              date  and  clock must be present; the T is always required.  The
107              date string must be of  the  form  [-]yyyy[-mm[-dd]]  (Gregorian
108              calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock
109              string must be of the form hh:mm:ss[.xxx].  The  use  of  delim‐
110              iters  and their type and positions must be exactly as indicated
111              (however, input, output and plot formats are  customizable;  see
112              gmtdefaults).
113

OPTIONS

115       No space between the option flag and the associated arguments.
116
117
118       -B     Sets  map  boundary  annotation  and tickmark intervals; see the
119              psbasemap man page for all the details.
120
121       -E     Sets the viewpoint's azimuth and elevation [180/90].
122
123       -H     Input file(s) has Header record(s).  Number  of  header  records
124              can be changed by editing your .gmtdefaults4 file.  If used, GMT
125              default is 1 header record. Use -Hi if only  input  data  should
126              have  header  records  [Default will write out header records if
127              the input data have them]. Blank lines and lines starting with #
128              are always skipped.
129
130       -K     More  PostScript code will be appended later [Default terminates
131              the plot system].
132
133       -M     Multiple segment file.  Segments are separated by a record whose
134              first character is <flag>.  [Default is '>'].
135
136       -N     Invert  the  sense  of what is inside and outside, i.e., use the
137              outside of the polygons for clipping.
138
139       -O     Selects Overlay plot mode [Default initializes a new  plot  sys‐
140              tem].
141
142       -P     Selects Portrait plotting mode [Default is Landscape, see gmtde‐
143              faults to change this].
144
145       -U     Draw Unix System time stamp on plot.  By adding just/dx/dy/, the
146              user  may  specify  the justification of the stamp and where the
147              stamp should fall on the page relative to lower left  corner  of
148              the  plot.  For example, BL/0/0 will align the lower left corner
149              of the time stamp with  the  lower  left  corner  of  the  plot.
150              Optionally,  append  a  label, or c (which will plot the command
151              string.).  The  GMT  parameters  UNIX_TIME,  UNIX_TIME_POS,  and
152              UNIX_TIME_FORMAT  can affect the appearance; see the gmtdefaults
153              man page for details.  The time string will be in the locale set
154              by the environment variable TZ (generally local time).
155
156       -V     Selects verbose mode, which will send progress reports to stderr
157              [Default runs "silently"].
158
159       -X -Y  Shift plot origin relative to the current origin by  (x-shift,y-
160              shift)  and optionally append the length unit (c, i, m, p).  You
161              can prepend a to shift the origin back to the original  position
162              after  plotting,  or  prepend   r [Default] to reset the current
163              origin to the new location.  If -O is used then the default  (x-
164              shift,y-shift)  is  (0,0), otherwise it is (r1i, r1i) or (r2.5c,
165              r2.5c).  Alternatively, give c to align the center coordinate (x
166              or  y)  of the plot with the center of the page based on current
167              page size.
168
169       -Z     For 3-D projections:  Sets the z-level of the polygons [0].
170
171       -:     Toggles between  (longitude,latitude)  and  (latitude,longitude)
172              input and/or output.  [Default is (longitude,latitude)].  Append
173              i to select input only or o to  select  output  only.   [Default
174              affects both].
175
176       -bi    Selects binary input.  Append s for single precision [Default is
177              d  (double)].   Uppercase  S  or  D  will  force  byte-swapping.
178              Optionally,  append  ncol,  the number of columns in your binary
179              input file if it exceeds the columns needed by the program.   Or
180              append  c  if  the  input  file  is  netCDF.  Optionally, append
181              var1/var2/... to specify the variables to be read.  [Default  is
182              2 input columns].
183
184       -c     Specifies the number of plot copies. [Default is 1].
185
186       -f     Special  formatting of input and/or output columns (time or geo‐
187              graphical data).  Specify i or o to  make  this  apply  only  to
188              input  or  output  [Default  applies to both].  Give one or more
189              columns (or column ranges) separated by commas.  Append T (abso‐
190              lute  calendar time), t (relative time in chosen TIME_UNIT since
191              TIME_EPOCH), x (longitude), y (latitude), or f (floating  point)
192              to  each  column or column range item.  Shorthand -f[i|o]g means
193              -f[i|o]0x,1y (geographic coordinates).
194

EXAMPLES

196       To make an overlay PostScript file that will set up a complex clip area
197       to which subsequent plotting will be confined, run:
198
199       psclip my_region.xy -R0/40/0/40 -Jm0.3i -O -K > clip_mask_on.ps
200
201       To deactivate the clipping in an existing plotfile, run:
202
203       psclip -C -O >> complex_plot.ps
204

BUGS

206       psclip  cannot  handle  polygons  that contain the south or north pole.
207       For such polygons, you should split them into two and make each explic‐
208       itly  contain  the  polar point.  The two clip polygons will combine to
209       give the desired effect.
210

SEE ALSO

212       GMT(1), grdmask(1), psbasemap(1), psmask(1)
213
214
215
216GMT 4.3.1                         15 May 2008                        PSCLIP(1)
Impressum