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>grd2xyz</TITLE>
</HEAD>
<BODY>
<H1>grd2xyz</H1>
<HR>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
grd2xyz - Converting a grdfile to an ASCII or binary table
</PRE>
<H2>SYNOPSIS</H2><PRE>
<B>grd2xyz</B> <I>grdfile</I> [ <B>-H</B>[<I>nrec</I>] ] [ <B>-L</B> ] [
<B>-R</B><I>west/east/south/north</I>[<B>r</B>] [ <B>-S</B>[<B>r</B> ] [ <B>-V</B> ] [ <B>-Z</B>[<I>flags</I>] ] [
<B>-bo</B>[<B>s</B>] ]
</PRE>
<H2>DESCRIPTION</H2><PRE>
<B>grd2xyz</B> reads a binary 2-D grdfile and writes out xyz-
triplets in ASCII [or binary] format to standard output.
Modify the precision of the ASCII output format by editing
the D_FORMAT parameter in your .gmtdefaults file, or
choose binary output using single or double precision
storage. As an option you may output z-values without the
(x,y) in a number of formats, see <B>-Z</B> below.
<I>grdfile</I>
The 2-D binary file to be converted.
</PRE>
<H2>OPTIONS</H2><PRE>
<B>-H</B> Output 1 header record based on information in the
grdfile header. Ignored if binary output is
selected. [Default is no header].
<B>-L</B> Indicates that the x values are longitudes (neces
sary for <B>-:</B> to work).
<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.
<B>-S</B> Suppress output for nodes whose z-value equals NaN
[Default outputs all nodes]. Append <B>r</B> to reverse
the suppression, i.e., only output the nodes whose
z-value equals NaN.
<B>-V</B> Selects verbose mode, which will send progress
reports to stderr [Default runs "silently"].
<B>-Z</B> Write a 1-column ASCII [or binary] table. Output
will be organized according to the specified order
ing convention contained in <I>flags</I>. If data should
be written by 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 should start at left or right end of row.
Likewise for column formats: 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 reg
istered grids: If grid is periodic in x but the
y, skip writing the redundant row at y = ymax by
appending <B>y</B>. If the byte-order needs to be swapped,
append <B>w</B>. Select one of several 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 output.
<B>-bo</B> Selects binary output. Append <B>s</B> for single preci
sion [Default is double]. This option only applies
to xyz output; see <B>-Z</B> for z table output.
</PRE>
<H2>EXAMPLES</H2><PRE>
To edit individual values in the 5' by 5' hawaii_grv.grd
file, try
grd2xyz hawaii_grv.grd > hawaii_grv.xyz
To write a single precision binary file without the x,y
positions from the file raw_data.grd file, using scanline
orientation, try
grd2xyz raw_data.grd <B>-ZTLf</B> > hawaii_grv.b
</PRE>
<H2>SEE ALSO</H2><PRE>
<I><A HREF="gmtdefaults.html">gmtdefaults</A></I>(l), <I>gmt</I>(l), <I><A HREF="grdedit.html">grdedit</A></I>(l), <I><A HREF="xyz2grd.html">xyz2grd</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">
|