Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

segy2grd(1gmt) [debian man page]

SEGY2GRD(1gmt)						       Generic Mapping Tools						    SEGY2GRD(1gmt)

NAME
segy2grd - Converting SEGY file to grid file format SYNOPSIS
segy2grd segyfile -Ggrdfile -Ixinc[unit][=|+][/yinc[unit][=|+]] -Rwest/east/south/north[r] [ -A[n|z] ] [ -Dxname/yname/zname/scale/off- set/title/remark ] [ -F ] [ -Nnodata ] [ -S[zfile] ] [ -V ] [ -Z[flags] ] [ -:[i|o] ] [ -bi[s|S|d|D[ncol]|c[var1/...]] ] DESCRIPTION
segy2grd reads an IEEE SEGY file and creates a binary grid file. Either a simple mapping (equivalent to xyz2grd -Z) or a more complicated averaging where a particular grid cell includes values from more than one sample in the SEGY file can be done. segy2grd 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. segyfile is an IEEE floating point SEGY file. Traces are all assumed to start at 0 time/depth. -G grdfile is the name of the binary output grid file. -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, and you may specify them in decimal degrees or in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left and upper right map coordinates are given instead of w/e/s/n. The two shorthands -Rg and -Rd stand for global domain (0/360 and -180/+180 in longitude respectively, with -90/+90 in latitude). Alterna- tively, specify the name of an existing grid file and the -R settings (and grid spacing, if applicable) are copied from the grid. OPTIONS
-A Add up multiple values that belong to the same node (same as -Az). Append n to simply count the number of data points that were assigned to each node. [Default (no -A option) will calculate mean value]. Not used for simple mapping. -D Give values for xname, yname, zname, scale, offset, title, and remark. To leave some of these values untouched, specify = as the value. -F Force pixel registration [Default is grid registration]. -N No data. Set nodes with no input sample to this value [Default is NaN]. -S set variable spacing header is c for cdp, o for offset, b<number> for 4-byte float starting at byte number If -S not set, assumes even spacing of samples at the dx, dy supplied with -I -L Override number of samples in each trace -X applies scalar x-scale to coordinates in trace header to match the coordinates specified in -R -Y Specifies sample interval as s_int if incorrect in the SEGY file -M Fix number of traces to read in. Default tries to read 10000 traces. -M0 will read number in binary header, -Mn will attempt to read only n traces. -V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. EXAMPLES To create a grid file from an even spaced SEGY file test.segy, try segy2grd test.segy -I0.1/0.1 -Gtest.grd -R198/208/18/25 -V Note that this will read in 18-25s (or km) on each trace, but the first trace will be assumed to be at X=198 To create a grid file from the SEGY file test.segy, locating traces according to the CDP number, where there are 10 CDPs per km and the sample interval is 0.1, try segy2grd test.segy -Gtest.grd -R0/100/0/10 -I0.5/0.2 -V -X0.1 -Y0.1 Because the grid interval is larger than the SEGY file sampling, the individual samples will be averaged in bins SEE ALSO
GMT(1), grd2xyz(1), grdedit(1), pssegy(1) GMT 4.5.7 15 Jul 2011 SEGY2GRD(1gmt)

Check Out this Related Man Page

XYZ2GRD(l)																XYZ2GRD(l)

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] [ -A[n|z] ] [ -Dxunit/yunit/zunit/scale/offset/title/remark ] [ -F ] [ -H[nrec] ] [ -L ] [ -Nnodata ] [ -S[zfile] ] [ -V ] [ -Z[flags] ] [ -: ] [ -bi[s][n] ] DESCRIPTION
xyz2grd reads a z or xyz table 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]. Nodes with more than one value will be set to the average value. As an option (using -Z), a 1-column z-table may be read assuming all nodes are present (z-tables can be in organized in a number of formats, see -Z below.) [xy]zfile ASCII [or binary] file holding z or (x,y,z) values. xyz triplets do not have to be sorted (for binary triplets, see -b). 1-column z tables must be sorted and the -Z must be set). -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
-A Add up multiple values that belong to the same node (same as -Az). Append n to simply count the number of data points that were assigned to each node. [Default (no -A option) will calculate mean value]. Ignored if -Z is given. -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 registration]. -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 input xyz triplet to this value [Default is NaN]. For z-tables, this option is used to replace z-values that equal nodata with NaN. -S Swap the byte-order of the input only. No grid file is produced. You must also supply the -Z option. The output is written to zfile (or stdout if not supplied). -V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. -Z Read a 1-column ASCII [or binary] table. This assumes that all the nodes are present and sorted according to specified ordering con- vention contained in flags. If incoming data represents rows, make flags start with T(op) if first row is y = ymax or B(ottom) if first row is y = ymin. Then, append L or R to indicate that first element is at left or right end of row. Likewise for column for- mats: start with L or R to position first column, and then append T or B to position first element in a row. For gridline regis- tered grids: If data are periodic in x but the incoming data do not contain the (redundant) column at x = xmax, append x. For data periodic in y without redundant row at y = ymax, append y. Append sn to skip the first n number of bytes (probably a header). If the byte-order needs to be swapped, append w. Select one of several data types (all binary except a): a ASCII representation c signed 1-byte character u unsigned 1-byte character h short 2-byte integer i 4-byte integer l long (4- or 8-byte) integer f 4-byte floating point single precision d 8-byte floating point double precision Default format is scanline orientation of ASCII numbers: -ZTLa. Note that -Z only applies to 1-column input. -: Toggles between (longitude,latitude) and (latitude,longitude) input/output. [Default is (longitude,latitude)]. Applies to geo- graphic coordinates only. -bi Selects binary input. Append s for single precision [Default is double]. Append n for the number of columns in the binary file(s). [Default is 3 input columns]. This option only applies to xyz input files; see -Z for z tables. 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 (3-column, 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 -b3 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. -Dm/m/m/1/0/=/= -Gustopo.grd -R234/294/24/50 -I30c -N-9999 -V -ZTLhw 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 -Snew_floats.bin -V -Zf SEE ALSO
gmt(1gmt), grd2xyz(1gmt), grdedit(1gmt) 1 Jan 2004 XYZ2GRD(l)
Man Page