EnglishFrenchSpanish

Ad


OnWorks favicon

grdrastergmt - Online in the Cloud

Run grdrastergmt in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command grdrastergmt that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


grdraster - Extract subregion from a binary raster and save as a GMT grid

SYNOPSIS


grdraster [ filenumber | "text pattern" ] region [ grdfile ] [ increment ] [ parameters ]
[ [level] ] [ -bo<binary> ] [ -do<nodata> ] [ -o<flags> ]

Note: No space is allowed between the option flag and the associated arguments.

DESCRIPTION


grdraster reads a file called grdraster.info from the current working directory, the
directories pointed to by the environment variables $GMT_USERDIR and $GMT_DATADIR, or in
$GMT_SHAREDIR/dbase (in that order). The file grdraster.info defines binary arrays of data
stored in scan-line format in data files. Each file is given a filenumber in the info
file. grdraster figures out how to load the raster data into a grid file spanning a region
defined by -R. By default the grid spacing equals the raster spacing. The -I option may be
used to sub-sample the raster data. No filtering or interpolating is done, however; the
x_inc and y_inc of the grid must be multiples of the increments of the raster file and
grdraster simply takes every n'th point. The output of grdraster is either grid or pixel
registered depending on the registration of the raster used. It is up to the GMT system
person to maintain the grdraster.info file in accordance with the available rasters at
each site. Raster data sets are not supplied with GMT but can be obtained by anonymous ftp
and on CD-ROM (see README page in dbase directory). grdraster will list the available
files if no arguments are given. Finally, grdraster will write xyz-triplets to stdout if
no output gridfile name is given

REQUIRED ARGUMENTS


filenumber
If an integer matching one of the files listed in the grdraster.info file is given
we will use that data set, else we will match the given text pattern with the data
set description in order to determine the data set.

-R[unit]west/east/south/north[/zmin/zmax][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). Alternatively for grid creation, give
Rcodelon/lat/nx/ny, where code is a 2-character combination of L, C, R (for left,
center, or right) and T, M, B for top, middle, or bottom. e.g., BL for lower left.
This indicates which point on a rectangular region the lon/lat coordinate refers
to, and the grid dimensions nx and ny with grid spacings via -I is used to create
the corresponding region. Alternatively, specify the name of an existing grid file
and the -R settings (and grid spacing, if applicable) are copied from the grid.
Using -Runit expects projected (Cartesian) coordinates compatible with chosen -J
and we inversely project to determine actual rectangular geographic region. For
perspective view (-p), optionally append /zmin/zmax. In case of perspective view
(-p), a z-range (zmin, zmax) can be appended to indicate the third dimension. This
needs to be done only when using the -Jz option, not when using only the -p option.
In the latter case a perspective view of the plane is plotted, with no third
dimension. If r is appended, you may also specify a map projection to define the
shape of your region. The output region will be rounded off to the nearest whole
grid-step in both dimensions.

OPTIONAL ARGUMENTS


-Ggrdfile
Name of output grid file. If not set, the grid will be written as ASCII (or binary;
see -bo) xyz-triplets to stdout instead.

-Ixinc[unit][=|+][/yinc[unit][=|+]]
x_inc [and optionally y_inc] is the grid spacing. Optionally, append a suffix
modifier. Geographical (degrees) coordinates: Append m to indicate arc minutes or s
to indicate arc seconds. If one of the units e, f, k, M, n or u is appended
instead, the increment is assumed to be given in meter, foot, km, Mile, nautical
mile or US survey foot, respectively, and will be converted to the equivalent
degrees longitude at the middle latitude of the region (the conversion depends on
PROJ_ELLIPSOID). If /y_inc is given but set to 0 it will be reset equal to x_inc;
otherwise it will be converted to degrees latitude. All coordinates: If = is
appended then the corresponding max x (east) or y (north) may be slightly adjusted
to fit exactly the given increment [by default the increment may be adjusted
slightly to fit the given domain]. Finally, instead of giving an increment you may
specify the number of nodes desired by appending + to the supplied integer
argument; the increment is then recalculated from the number of nodes and the
domain. The resulting increment value depends on whether you have selected a
gridline-registered or pixel-registered grid; see App-file-formats for details.
Note: if -Rgrdfile is used then the grid spacing has already been initialized; use
-I to override the values.

-Jparameters (more ...)
Select map projection.

-V[level] (more ...)
Select verbosity level [c].

-bo[ncols][type] (more ...)
Select native binary output.

-donodata (more ...)
Replace output columns that equal NaN with nodata.

-ocols[,...] (more ...)
Select output columns (0 is first column).

This option applies only if no -G option has been set.

-^ or just -
Print a short message about the syntax of the command, then exits (NOTE: on Windows
use just -).

-+ or just +
Print an extensive usage (help) message, including the explanation of any
module-specific option (but not the GMT common options), then exits.

-? or no arguments
Print a complete usage (help) message, including the explanation of options, then
exits.

--version
Print GMT version and exit.

--show-datadir
Print full path to GMT share directory and exit.

EXAMPLES


To extract data from raster 1, taking one point every 30 minutes, in an area extended
beyond 360 degrees to allow later filtering, run

gmt grdraster 1 -R-4/364/-62/62 -I30m -Gdata.nc

To obtain data for an oblique Mercator projection we need to extract more data that is
actually used. This is necessary because the output of grdraster has edges defined by
parallels and meridians, while the oblique map in general does not. Hence, to get all the
data from the ETOPO2 data needed to make a contour map for the region defined by its lower
left and upper right corners and the desired projection, use

gmt grdraster ETOPO2 -R160/20/220/30r -Joc190/25.5/292/69/1 -Gdata.nc

To extract data from the 2 min Geoware relief blend and write it as binary double
precision xyz-triplets to standard output:

gmt grdraster "2 min Geoware" -R20/25/-10/5 -bo > triplets.b

Use grdrastergmt online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Phaser
    Phaser
    Phaser is a fast, free, and fun open
    source HTML5 game framework that offers
    WebGL and Canvas rendering across
    desktop and mobile web browsers. Games
    can be co...
    Download Phaser
  • 2
    VASSAL Engine
    VASSAL Engine
    VASSAL is a game engine for creating
    electronic versions of traditional board
    and card games. It provides support for
    game piece rendering and interaction,
    and...
    Download VASSAL Engine
  • 3
    OpenPDF - Fork of iText
    OpenPDF - Fork of iText
    OpenPDF is a Java library for creating
    and editing PDF files with a LGPL and
    MPL open source license. OpenPDF is the
    LGPL/MPL open source successor of iText,
    a...
    Download OpenPDF - Fork of iText
  • 4
    SAGA GIS
    SAGA GIS
    SAGA - System for Automated
    Geoscientific Analyses - is a Geographic
    Information System (GIS) software with
    immense capabilities for geodata
    processing and ana...
    Download SAGA GIS
  • 5
    Toolbox for Java/JTOpen
    Toolbox for Java/JTOpen
    The IBM Toolbox for Java / JTOpen is a
    library of Java classes supporting the
    client/server and internet programming
    models to a system running OS/400,
    i5/OS, o...
    Download Toolbox for Java/JTOpen
  • 6
    D3.js
    D3.js
    D3.js (or D3 for Data-Driven Documents)
    is a JavaScript library that allows you
    to produce dynamic, interactive data
    visualizations in web browsers. With D3
    you...
    Download D3.js
  • More »

Linux commands

  • 1
    abidiff
    abidiff
    abidiff - compare ABIs of ELF files
    abidiff compares the Application Binary
    Interfaces (ABI) of two shared libraries
    in ELF format. It emits a meaningful
    repor...
    Run abidiff
  • 2
    abidw
    abidw
    abidw - serialize the ABI of an ELF
    file abidw reads a shared library in ELF
    format and emits an XML representation
    of its ABI to standard output. The
    emitted ...
    Run abidw
  • 3
    copac2xml
    copac2xml
    bibutils - bibliography conversion
    utilities ...
    Run copac2xml
  • 4
    copt
    copt
    copt - peephole optimizer SYSNOPIS:
    copt file.. DESCRIPTION: copt is a
    general-purpose peephole optimizer. It
    reads code from its standard input and
    writes an ...
    Run copt
  • 5
    gather_stx_titles
    gather_stx_titles
    gather_stx_titles - gather title
    declarations from Stx documents ...
    Run gather_stx_titles
  • 6
    gatling-bench
    gatling-bench
    bench - http benchmark ...
    Run gatling-bench
  • More »

Ad