GRDREFORMAT

Section: Misc. Reference Manual Pages (l)
Updated: DATE
Index Return to Main Contents
 

NAME

grdreformat - Converting between different grdfile formats.  

SYNOPSIS

grdreformat ingrdfile[=id[/scale/offset[/nanvalue]]] outgrdfile[=id[/scale/offset[/nanvalue]]] [ -Rwest/east/south/north[r] ] [ -V ]  

DESCRIPTION

grdreformat reads a grdfile in one format and writes it out using another format. As an option the user may select a subset of the data to be written and to specify scaling, translation, and nan-value.
ingrdfile
The grdfile to be read. Append format =id number if not a standard GMT netcdf-based grdfile. If id is set, you may optionally append scale and offset to scale the data and then add an offset. If scale and offset are supplied you may also append a value that represent 'not-a-number' (for floating-point grids this is unneccesary since the IEEE NaN is used; however short integers need a value which means no data available.)
outgrdfile
The grdfile to be written. Append format =id number if not a standard GMT netcdf-based grdfile. If id is set, you may optionally append scale and offset to scale the data and then add an offset. If scale and offset are supplied you may also append a value that represent 'not-a-number' (for floating-point grids this is unneccesary since the IEEE NaN is used; however short integers need a value which means no data available.)
 

OPTIONS

#include "explain_-R.txt" #include "explain_-V.txt"  

EXAMPLES

To create a 4-byte raw floating point grid from the netcdf file data.grd, try

grdreformat data.grd ras_data.b4=1 -V

To make a 2-byte short integer file and scale it by 10 and subtract 32000, letting NaNs be represented by the value -9999, do

grdreformat values.grd shorts.i2=2/10/-32000/-9999 -V

To create a Sun standard 8-bit rasterfile for a subset of the data file image.grd, assuming the range in image.grd is 0-1 and we need 0-255, try

grdreformat image.grd -R-60/-40/-40/-30 image.ras8=3/255/0 -V  

SEE ALSO

gmt, grdmath #include "refs.i"


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 07:11:27 GMT, January 07, 2025