NAME
xyz2grd - Converting an ASCII or binary table to grd file
format
SYNOPSIS
xyz2grd xyzfile - Ggrdfile - Ix_inc[m|c][/y_inc[m|c]] -
Rwest/east/south/north[r] [ -
Dxunit/yunit/zunit/scale/offset/title/remark ] [ -F ] [ -H ]
[ -L ] [ -Nnodata ] [ -V ] [ -Z ] [ -: ] [ -b[d] ]
DESCRIPTION
xyz2grd reads an ASCII [or binary] table with xyz triplets
in the first 3 columns and creates a binary grdfile.
xyz2grd 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]. As an option, a 1-
column z-table may be read assuming the ordering follows the
scanline orientation and that all nodes are present.
xyzfile
ASCII [or binary, see -b] file holding (x,y,z) values
in the first three columns for all the nodes. The tri-
plets do not have to be sorted (unless -Z is used).
-G grdfile is the name of the binary output grdfile.
-I x_inc [and optionally y_inc] is the grid spacing.
Append m to indicate minutes or c to indicate seconds.
-R west, east, south, and north specify the Region of
interest. To specify boundaries in degrees and minutes
[and seconds], use the dd:mm[:ss] format. Append r if
lower left and upper right map coordinates are given
instead of wesn.
OPTIONS
-D Give values for xunit, yunit, zunit, scale, offset,
title, and remark. To leave some of these values
untouched, specify = as the value.
-F Force pixel registration [Default is grid registra-
tion].
-H Input file(s) has Header record(s). Number of header
records can be changed by editing your .gmtdefaults
file. If used, GMT default is 1 header record. Not
used with binary data.
-L Indicates that the x column contains longitudes, which
may differ from the regions in -R by [multiples of] 360
degrees [Default assumes no periodicity].
-N No data. Set nodes with no data to this value
[Default is NaN].
-V Selects verbose mode, which will send progress reports
to stderr [Default runs "silently"].
-Z Only read a 1-column ASCII [or binary] table. This
assumes that all the nodes are present and sorted
according to the scanline ordering convention.
- : Toggles between (longitude,latitude) and
(latitude,longitude) input/output. [Default is
(longitude,latitude)]
-b Selects binary input mode (double precision) [Default
is ASCII]. Append d to indicate double precision
[Default is single].
EXAMPLES
To create a grdfile from the ASCII data in hawaii_grv.xyz,
try
xyz2grd hawaii_grv.xyz - Ddegree/degree/mGal/1/0/"Hawaiian
Gravity"/"GRS-80 Ellipsoid used" - Ghawaii_grv_new.grd -
R198/208/18/25 -I5m -V
To create a grdfile from the raw binary (single-precision)
scanline-oriented data raw.b, try
xyz2grd raw.b -Dm/m/m/1/0/=/= -Graw.grd -R0/100/0/100 -I1 -V
-Z -b
SEE ALSO
gmt, grd2xyz, grdedit
REFERENCES
Wessel, P., and W. H. F. Smith, 1995, The Generic Mapping
Tools (GMT) version 3.0 Technical Reference & Cookbook,
SOEST/NOAA.
Wessel, P., and W. H. F. Smith, 1995, New Version of the
Generic Mapping Tools Released, EOS Trans. AGU, 76, p. 329.
Wessel, P., and W. H. F. Smith, 1995, New Version of the
Generic Mapping Tools Released,
http://www.agu.org/eos_elec/95154e.html, Copyright 1995 by
the American Geophysical Union.
Wessel, P., and W. H. F. Smith, 1991, Free Software Helps
Map and Display Data, EOS Trans. AGU, 72, p. 441.