OnWorks favicon

grdprojectgmt - Online in the Cloud

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

This is the command grdprojectgmt 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



grdproject - Forward and inverse map transformation of grids


grdproject in_grdfile out_grdfile parameters [ [dx/dy] ] [
xinc[unit][=|+][/yinc[unit][=|+]] ] [ dpi ] [ [c|i|p|e|f|k|M|n|u] ] [ ] [ c|i|p ] [
region ] [ [level] ] [ -n<flags> ] [ -r ]

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


grdproject will do one of two things depending whether -I has been set. If set, it will
transform a gridded data set from a rectangular coordinate system onto a geographical
system by resampling the surface at the new nodes. If not set, it will project a
geographical gridded data set onto a rectangular grid. To obtain the value at each new
node, its location is inversely projected back onto the input grid after which a value is
interpolated between the surrounding input grid values. By default bi-cubic interpolation
is used. Aliasing is avoided by also forward projecting the input grid nodes. If two or
more nodes are projected onto the same new node, their average will dominate in the
calculation of the new node value. Interpolation and aliasing is controlled with the -n
option. The new node spacing may be determined in one of several ways by specifying the
grid spacing, number of nodes, or resolution. Nodes not constrained by input data are set
to NaN.

The -R option can be used to select a map region larger or smaller than that implied by
the extent of the grid file.


2-D binary grid file to be transformed. (See GRID FILE FORMATS below.)

Specify the name of the output grid file. (See GRID FILE FORMATS below.)

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


Let projected coordinates be relative to projection center [Default is relative to
lower left corner]. Optionally, add offsets in the projected units to be added (or
subtracted when -I is set) to (from) the projected coordinates, such as false
eastings and northings for particular projection zones [0/0].

Set the grid spacing for the new grid. Append m for arc minute, s for arc second.
If neither -D nor -E are set then we select the same number of output nodes as
there are input nodes.

-Edpi Set the resolution for the new grid in dots per inch.

Force 1:1 scaling, i.e., output (or input, see -I) data are in actual projected
meters [e]. To specify other units, append f (foot), k (km), M (statute mile), n
(nautical mile), u (US survey foot), i (inch), c (cm), or p (point). Without -F,
the output (or input, see -I) are in the units specified by PROJ_LENGTH_UNIT (but
see -M).

-I Do the Inverse transformation, from rectangular to geographical.

Append c, i, or p to indicate that cm, inch, or point should be the projected
measure unit [Default is set by PROJ_LENGTH_UNIT in gmt.conf]. Cannot be used with

-R[unit]xmin/xmax/ymin/ymax[r] (more ...)
Specify the region of interest. You may ask to project only a subset of the grid by
specifying a smaller input w/e/s/n region [Default is the region given by the grid

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

-n[b|c|l|n][+a][+bBC][+c][+tthreshold] (more ...)
Select interpolation mode for grids.

-r (more ...)
Set pixel node registration [gridline].

-^ 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

Print GMT version and exit.

Print full path to GMT share directory and exit.


By default GMT writes out grid as single precision floats in a COARDS-complaint netCDF
file format. However, GMT is able to produce grid files in many other commonly used grid
file formats and also facilitates so called "packing" of grids, writing out floating point
data as 1- or 2-byte integers. To specify the precision, scale and offset, the user should
add the suffix =id[/scale/offset[/nan]], where id is a two-letter identifier of the grid
type and precision, and scale and offset are optional scale factor and offset to be
applied to all grid values, and nan is the value used to indicate missing data. In case
the two characters id is not provided, as in =/scale than a id=nf is assumed. When
reading grids, the format is generally automatically recognized. If not, the same suffix
can be added to input grid file names. See grdconvert and Section grid-file-format of the
GMT Technical Reference and Cookbook for more information.

When reading a netCDF file that contains multiple grids, GMT will read, by default, the
first 2-dimensional grid that can find in that file. To coax GMT into reading another
multi-dimensional variable in the grid file, append ?varname to the file name, where
varname is the name of the variable. Note that you may need to escape the special meaning
of ? in your shell program by putting a backslash in front of it, or by placing the
filename and suffix between quotes or double quotes. The ?varname suffix can also be used
for output grids to specify a variable name different from the default: "z". See
grdconvert and Sections modifiers-for-CF and grid-file-format of the GMT Technical
Reference and Cookbook for more information, particularly on how to read splices of 3-,
4-, or 5-dimensional grids.


To transform the geographical grid dbdb5.nc onto a pixel Mercator grid at 300 dpi, run

gmt grdproject dbdb5.nc -R20/50/12/25 -Jm0.25i -E300 -r -Gdbdb5_merc.nc

To inversely transform the file topo_tm.nc back onto a geographical grid, use

gmt grdproject topo_tm.nc -R-80/-70/20/40 -Jt-75/1:500000 -I -D5m -V -Gtopo.nc

This assumes, of course, that the coordinates in topo_tm.nc were created with the same
projection parameters.

To inversely transform the file topo_utm.nc (which is in UTM meters) back to a
geographical grid we specify a one-to-one mapping with meter as the measure unit:

gmt grdproject topo_utm.nc -R203/205/60/65 -Ju5/1:1 -I -Mm -Gtopo.nc -V

To inversely transform the file data.nc (which is in Mercator meters with Greenwich as the
central longitude and a false easting of -4 and produced on the ellipse WGS-72) back to a
geographical grid we specify a one-to-one mapping with meter as the measure unit:

gmt grdproject data.nc -Jm/1:1 -I -F -C-4/0 -Gdata_geo.nc -V --PROJ_ELLIPSOID=WGS-72


The boundaries of a projected (rectangular) data set will not necessarily give rectangular
geographical boundaries (Mercator is one exception). In those cases some nodes may be
unconstrained (set to NaN). To get a full grid back, your input grid may have to cover a
larger area than you are interested in.

Use grdprojectgmt online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Fork of TeamWinRecoveryProject(TWRP)
    with many additional functions, redesign
    and more Features:Supports Treble and
    non-Treble ROMsUp-to-date Oreo kernel,
    Download OrangeFox
  • 2
    itop - ITSM  CMDB OpenSource
    itop - ITSM CMDB OpenSource
    IT Operations Portal: a complete open
    source, ITIL, web based service
    management tool including a fully
    customizable CMDB, a helpdesk system and
    a document man...
    Download itop - ITSM CMDB OpenSource
  • 3
    Clementine is a multi-platform music
    player and library organizer inspired by
    Amarok 1.4. It has a fast and
    easy-to-use interface, and allows you to
    search and ...
    Download Clementine
  • 4
    ATTENTION: Cumulative update 2.4.3 has
    been released!! The update works for any
    previous 2.x.x version. If upgrading
    from version v1.x.x, please download and
    Download XISMuS
  • 5
    Modular headtracking program that
    supports multiple face-trackers, filters
    and game-protocols. Among the trackers
    are the SM FaceAPI, AIC Inertial Head
    Tracker ...
    Download facetracknoir
  • 6
    PHP QR Code
    PHP QR Code
    PHP QR Code is open source (LGPL)
    library for generating QR Code,
    2-dimensional barcode. Based on
    libqrencode C library, provides API for
    creating QR Code barc...
    Download PHP QR Code
  • 7
    Cuckoo Sandbox
    Cuckoo Sandbox
    Cuckoo Sandbox uses components to
    monitor the behavior of malware in a
    Sandbox environment; isolated from the
    rest of the system. It offers automated
    analysis o...
    Download Cuckoo Sandbox
  • More »

Linux commands

  • 1
    rsbac-admin - Rule Set Based Access
    Control DESCRIPTION: rsbac-admin is a
    set of tool used to manage systems using
    a Rule Set Based Access Control (RSBAC)
    Run acl_gran
  • 2
    rsbac-admin - Rule Set Based Access
    Control DESCRIPTION: rsbac-admin is a
    set of tool used to manage systems using
    a Rule Set Based Access Control (RSBAC)
    Run acl_grant
  • 3
    cpupower idle-set - Utility to set cpu
    idle state specific kernel options
    SYNTAX: cpupower [ -c cpulist ]
    idle-info [options] DESCRIPTION: The
    cpupower idle-se...
    Run cpupower-idle-set
  • 4
    cpupower-info - Shows processor power
    related kernel or hardware
    configurations ...
    Run cpupower-info
  • 5
    g15daemon - provides access to extra
    keys and the LCD available on the
    logitech G15 keyboard. DESCRIPTION:
    G15Daemon allows users access to all
    extra keys by d...
    Run g15daemon
  • 6
    laditools - tools to control and
    monitor LADI (JACK and ladish) systems ...
    Run g15ladi
  • More »