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

OPTIONS

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

EXAMPLES

215       To make an overlay PostScript file that will set up a complex clip area
216       to which subsequent plotting will be confined, run:
217
218       psclip my_region.xy -R0/40/0/40 -Jm0.3i -O -K > clip_mask_on.ps
219
220       To deactivate the clipping in an existing plotfile, run:
221
222       psclip -C -O >> complex_plot.ps
223

BUGS

225       psclip  cannot  handle  polygons  that contain the south or north pole.
226       For such polygons, you should split them into two and make each explic‐
227       itly  contain  the  polar point.  The two clip polygons will combine to
228       give the desired effect.
229

SEE ALSO

231       GMT(1), grdmask(1), psbasemap(1), psmask(1)
232
233
234
235GMT 4.5.6                         10 Mar 2011                        PSCLIP(1)
Impressum