GRDIMAGE

Section: Misc. Reference Manual Pages (l)
Updated: DATE
Index Return to Main Contents
#ifdef SI #define UNIT cm #define LEN_L 1.5 #define LEN_X 25 #define SCALE   -Jx25
#else #define UNIT inch #define LEN_L 0.5 #define LEN_X 10 #define SCALE   -Jx10
#endif  

NAME

grdimage - Create grayshaded or colored image from a 2-D netCDF grd file  

SYNOPSIS

grdimage grdfile -Ccptfile -Jparameters [ -Btickinfo ] [ -Edpi ] [ -Fred/green/blue ] [ -Iintensfile] [ -K ] [ -M ] [ -O ] [ -P ] [ -Rwest/east/south/north[r] ] [ -U[/dx/dy/][label] ] [ -V ] [ -Xx-shift ] [ -Yy-shift ] [ -ccopies ] [ -0 || -1 || -2 ]  

DESCRIPTION

grdimage reads a 2-D gridded file and produces a gray-shaded (or colored) map by assigning each contour interval a gray-shade (or color). Optionally, illumination may be added by providing a file with intensities in the (-1,+1) range. Values outside this range will be clipped. Such intensity files can be created from the grdfile using grdgradient and modified by grdmath or grdhisteq. Each grid-node in the grdfile is represented as a shaded (or colored) rectangle centered on the grid node. When using map projections, the grid is first resampled on a new rectangular grid (This can be a time-consuming process for large grid files). A 24-bit true color PostScript file is output using one of three methods. The region option can be used to select a map region larger or smaller than that implied by the extent of the grdfile.
grdfile
2-D gridded data set to be imaged
-C
name of the color palette table #include "explain_-j.txt"
 

OPTIONS

No space between the option flag and the associated arguments. #include "explain_-b.txt"
-E
Sets the resolution of the projected grid that will be created if a map projection other than Linear or Mercator was selected. By default, the projected grid will be of the same size (rows and columns) as the input file.
-F
Sets the color used for Frame and annotation. [Default is black]
-I
Gives the name of a grdfile with intensities in the (-1,+1) range. [Default is no illumination]. #include "explain_-K.txt"
-M
Force conversion to monochrome image using the (television) YIQ transformation. #include "explain_-O.txt" #include "explain_-P.txt" #include "explain_-R.txt" You may ask for a larger w/e/s/n region to have more room between the image and the axes. A smaller region than specified in the grdfile will result in a subset of the grid [Default is region given by the grdfile]. #include "explain_-U.txt" #include "explain_-V.txt" #include "explain_-XY.txt" #include "explain_-c.txt"
-0
Create the image using the Adobe PostScript colorimage operator. This is the GMT default (which can be modified in the .gmtdefaults file).
-1
Create the image by plotting individually colored tiles.
-2
Create the image by color separation using three calls to image for later processing by psto24.
 

EXAMPLES

To gray-shade the file hawaii_grav.grd with shades given in shades.cpt on a Lambert map at LEN_L UNIT/degree along the standard parallels 18 and 24, and using 1 degree tickmarks, try

grdimage hawaii_grav.grd -Jl18/24/LEN_L -Cshades.cpt -B1 > hawaii_grav_image.ps

To create an illuminated color PostScript plot of the gridded data set image.grd, using the intensities provided by the file intens.grd, and color levels in the file colors.cpt, with linear scaling at LEN_X UNIT/x-unit, tickmarks every 5 units, and using color separations for use with psto24, try

grdimage image.grd SCALE -Ccolors.cpt -Iintens.grd -B5 -2 > image.ps  

BUGS

Having three separate ways of creating the colorimage comes from the fact that many different implementations of the colorimage PostScript operator exists for a wide variety of hardcopy devices. The three options allow you to create the type of output required by your RIP.  

SEE ALSO

gmt, grdcontour, grdview, grdgradient, grdhisteq, ps2ras, psto24 #include "refs.i"


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
BUGS
SEE ALSO

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