File: grdmask.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 (132 lines) | stat: -rw-r--r-- 5,036 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
<HTML>
<HEAD>
<TITLE>grdmask</TITLE>
</HEAD>
<BODY>
<H1>grdmask</H1>
<HR>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
       grdmask - Create mask grdfiles from xy paths.


</PRE>
<H2>SYNOPSIS</H2><PRE>
       <B>grdmask</B> <I>pathfiles</I> <B>-G</B><I>mask</I><B>_</B><I>grd</I><B>_</B><I>file</I>] <B>-I</B><I>xinc</I>[<B>m|c</B>][/<I>yinc</I>[<B>m|c</B>]]
       <B>-R</B><I>west/east/south/north</I>[<I>r</I>] [ <B>-F</B> ] [ <B>-H</B>[<I>nrec</I>] ] [  <B>-L</B>  ]  [
       <B>-M</B>[<I>flag</I>] ] [ <B>-N</B><I>out/edge/in</I> ] [ <B>-S</B>[<I>radius</I>][<B>k</B>] ] [ <B>-V</B> ] [ <B>-:</B>
       ] [ <B>-bi</B>[<B>s</B>][<I>n</I>] ]


</PRE>
<H2>DESCRIPTION</H2><PRE>
       <B>grdmask</B> can operate in 2 different modes. 1. It reads  one
       or  more  xy-files that each define a closed polygon.  The
       nodes defined by the specified region and lattice  spacing
       will  be set equal to one of three possible values depend
       ing on whether the node is outside, on the polygon perime
       ter, or inside the polygon. The resulting mask grdfile may
       be used in subsequent operations involving <B><A HREF="grdmath.html">grdmath</A></B> to mask
       out data from polygonal areas. 2. The xy-files simply rep
       resent data point locations and the mask  is  set  to  the
       inside  or  outside  value  depending on whether a node is
       within a maximum distance from the nearest data point.  If
       the distance specified is zero then only the nodes nearest
       each data point are considered "inside".

       <I>pathfiles</I>
              The name of 1 or more ASCII  [or  binary,  see  <B>-b</B>]
              files holding the polygon(s) or data points.

       <B>-G</B>     Name of resulting output mask grd file.

       <B>-I</B>     <I>x</I><B>_</B><I>inc</I>  [and  optionally <I>y</I><B>_</B><I>inc</I>] is the grid spacing.
              Append <B>m</B> to indicate minutes or <B>c</B> to indicate  sec
              onds.

       <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.


</PRE>
<H2>OPTIONS</H2><PRE>
       <B>-F</B>     Force  pixel  registration. [Default is grid regis
              tration].

       <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>-L</B>     Indicates  that  the  x column contains longitudes,
              which may differ from the regions in <B>-R</B> by  [multi
              ples  of] 360 degrees [Default assumes no periodic
              ity].
              record  whose first character is <I>flag</I>.  [Default is
              '&gt;'].

       <B>-N</B>     Sets the values that will be assigned to nodes that
              are  <I>out</I>side  the polygons, on the <I>edge</I>, or <I>in</I>side.
              Values can be any number, including the  textstring
              NaN [Default is 0/0/1].

       <B>-S</B>     Set  nodes  depending  on  their  distance from the
              nearest data point. Nodes within <I>radius</I> [0] from  a
              data point are considered inside. Append <B>k</B> to indi
              cate map units (e.g., <B>-R</B> <B>-I</B> in degrees  and  <I>radius</I>
              in km).

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

       <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].


</PRE>
<H2>EXAMPLES</H2><PRE>
       To set all nodes inside and on the polygons coastline_*.xy
       to 0, and outside points to 1, do

       grdmask  coastline_*.xy  <B>-R</B>-60/-40/-40/-30  <B>-I</B>5<B>m</B>   <B>-N</B>1/0/0
       <B>-G</B>land_mask.grd <B>-V</B>

       To  set  nodes  within 50 km of data points to 1 and other
       nodes to NaN, do

       grdmask data.xyz <B>-R</B>-60/-40/-40/-30  <B>-I</B>5m  <B>-N</B>NaN/1/1  <B>-S</B>50<B>k</B>
       <B>-G</B>data_mask.grd <B>-V</B>


</PRE>
<H2>SEE ALSO</H2><PRE>
       <I>gmt</I>(l), <I><A HREF="grdlandmask.html">grdlandmask</A></I>(l), <I><A HREF="grdmath.html">grdmath</A></I>(l), <I><A HREF="grdclip.html">grdclip</A></I>(l), <I><A HREF="psmask.html">psmask</A></I>(l),
       <I><A HREF="psclip.html">psclip</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">