File: xyz2grd.html

package info (click to toggle)
gmt-doc 3.4-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,756 kB
  • ctags: 1,800
  • sloc: makefile: 30
file content (184 lines) | stat: -rw-r--r-- 8,115 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<HTML>
<HEAD>
<TITLE>xyz2grd</TITLE>
</HEAD>
<BODY>
<H1>xyz2grd</H1>
<HR>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
       xyz2grd  - Converting an ASCII or binary table to grd file
       format


</PRE>
<H2>SYNOPSIS</H2><PRE>
       <B>xyz2grd</B>   <I>xyzfile</I>   <B>-G</B><I>grdfile</I>    <B>-I</B><I>x</I><B>_</B><I>inc</I>[<B>m|c</B>][/<I>y</I><B>_</B><I>inc</I>[<B>m|c</B>]]
       <B>-R</B><I>west/east/south/north</I>[<B>r</B>]    [    <B>-A</B>[<B>n|z</B>]   ]   [   <B>-D</B><I>xu</I>
       <I>nit/yunit/zunit/scale/offset/title/remark</I>  ]  [  <B>-F</B>  ]   [
       <B>-H</B>[<I>nrec</I>]  ]  [  <B>-L</B>  ]  [ <B>-N</B><I>nodata</I> ] [ <B>-S</B>[<I>zfile</I>] ] [ <B>-V</B> ] [
       <B>-Z</B>[<I>flags</I>] ] [ <B>-:</B> ] [ <B>-bi</B>[<B>s</B>][<I>n</I>] ]


</PRE>
<H2>DESCRIPTION</H2><PRE>
       <B>xyz2grd</B> reads a z or xyz table and creates a  binary  grd
       file.  <B>xyz2grd</B>  will  report  if some of the nodes are not
       filled in with data. Such unconstrained nodes are set to a
       value  specified by the user [Default is NaN].  Nodes with
       more than one value will be set to the average  value.  As
       an  option  (using  <B>-Z</B>),  a  1-column  z-table may be read
       assuming all nodes are present (z-tables can be  in  orga
       nized in a number of formats, see <B>-Z</B> below.)

       <I>[xy]zfile</I>
              ASCII [or binary] file holding z or (x,y,z) values.
              xyz triplets do not have to be sorted  (for  binary
              triplets, see <B>-b</B>). 1-column z tables must be sorted
              and the <B>-Z</B> must be set).

       <B>-G</B>     <I>grdfile</I> is the name of the binary output grdfile.

       <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>-A</B>     Add up multiple values that belong to the same node
              (same as <B>-Az</B>).  Append <B>n</B> to simply count the number
              of data points that were  assigned  to  each  node.
              [Default (no <B>-A</B> <B>option)</B> <B>will</B> <B>calculate</B> <B>mean</B> <B>value].</B>
              <B>Ignored</B> <B>if</B> <B>-Z</B> <B>is</B> <B>given.</B>

       <B>-D</B>     Give values for <I>xunit,</I> <I>yunit,</I> <I>zunit,</I> <I>scale,</I> <I>offset,</I>
              <I>title,</I>  and  <I>remark</I>.  To leave some of these values
              untouched, specify = as the value.

       <B>-F</B>     Force pixel registration [Default is grid registra
              tion].

              defaults  file.  If  used,  <B><A HREF="GMT.html">GMT</A></B> default is 1 header
              record.  Not used with binary data.

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

       <B>-N</B>     No  data.  Set  nodes  with no input xyz triplet to
              this value [Default is  NaN].  For  z-tables,  this
              option  is  used  to  replace  z-values  that equal
              <I>nodata</I> with NaN.

       <B>-S</B>     Swap the byte-order of the input only. No grid file
              is  produced.  You  must also supply the <B>-Z</B> option.
              The output is written to <I>zfile</I> (or  stdout  if  not
              supplied).

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

       <B>-Z</B>     Read a  1-column  ASCII  [or  binary]  table.  This
              assumes  that  all the nodes are present and sorted
              according to  specified  ordering  convention  con
              tained in <I>flags</I>.  If incoming data represents rows,
              make <I>flags</I> start with <B>T</B>(op) if first  row  is  y  =
              ymax  or  <B>B</B>(ottom)  if first row is y = ymin. Then,
              append <B>L</B> or <B>R</B> to indicate that first element is  at
              left  or right end of row. Likewise for column for
              mats: start with <B>L</B> or <B>R</B> to position  first  column,
              and then append <B>T</B> or <B>B</B> to position first element in
              a row.  For gridline registered grids: If data  are
              periodic  in x but the incoming data do not contain
              the (redundant) column at x = xmax, append  <B>x</B>.  For
              data  periodic  in  y  without redundant row at y =
              ymax, append <B>y</B>. Append <B>s</B><I>n</I> to skip the first <I>n</I>  num
              ber of bytes (probably a header). If the byte-order
              needs to be swapped, append <B>w</B>. Select one  of  sev
              eral data types (all binary except <B>a</B>):

                      <B>a</B> ASCII representation
                      <B>c</B> signed 1-byte character
                      <B>u</B> unsigned 1-byte character
                      <B>h</B> short 2-byte integer
                      <B>i</B> 4-byte integer
                      <B>l</B> long (4- or 8-byte) integer
                      <B>f</B> 4-byte floating point single precision
                      <B>d</B> 8-byte floating point double precision

              Default  format  is  scanline  orientation of ASCII
              numbers: <B>-ZTLa</B>.   Note  that  <B>-Z</B>  only  applies  to
              1-column input.
              tude,longitude) input/output. [Default  is  (longi
              tude,latitude)].  Applies to geographic coordinates
              only.

       <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 3 input
              columns].  This  option  only  applies to xyz input
              files; see <B>-Z</B> for z tables.


</PRE>
<H2>EXAMPLES</H2><PRE>
       To create a grdfile from the ASCII data in hawaii_grv.xyz,
       try

       xyz2grd  hawaii_grv.xyz <B>-D</B>degree/degree/mGal/1/0/"Hawaiian
       Gravity"/"GRS-80  Ellipsoid   used"   <B>-G</B>hawaii_grv_new.grd
       <B>-R</B>198/208/18/25 <B>-I</B>5<B>m</B> <B>-V</B>

       To create a grdfile from the raw binary (3-column, single-
       precision) scanline-oriented data raw.b, try

       xyz2grd raw.b <B>-D</B>m/m/m/1/0/=/= <B>-G</B>raw.grd <B>-R</B>0/100/0/100  <B>-I</B>1
       <B>-V</B> <B>-Z</B> <B>-b</B>3

       To  make  a  grdfile  from  the raw binary USGS DEM (short
       integer) scanline-oriented data topo30. on the NGDC global
       relief  Data CD-ROM, with values of -9999 indicate missing
       data, one must on some machine reverse the byte-order.  On
       such machines (like Sun), try

       xyz2grd      topo30.      <B>-D</B>m/m/m/1/0/=/=     <B>-G</B>ustopo.grd
       <B>-R</B>234/294/24/50 <B>-I</B>30c <B>-N</B>-9999 <B>-V</B> <B>-ZTLhw</B>

       Say you have received a binary file with  4-byte  floating
       points  that  were written on a machine of different byte-
       order than yours. You can swap the byte-order with

       xyz2grd floats.bin <B>-S</B>new_floats.bin <B>-V</B> <B>-Zf</B>


</PRE>
<H2>SEE ALSO</H2><PRE>
       <I>gmt</I>(l), <I><A HREF="grd2xyz.html">grd2xyz</A></I>(l), <I><A HREF="grdedit.html">grdedit</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">