# grdproject(1gmt) [bsd man page]

GRDPROJECT(l)GRDPROJECT(l)NAME

grdproject - Forward and Inverse map transformation of 2-D grd filesSYNOPSIS

grdproject in_grdfile-Rwest/east/south/north[r] [ -A[k|m|n|i|c|p] ] [-Jparameters] [ -Ddx[m|c][/dy[m|c]] ] [-C] [-Edpi] [-F] [-Gout_grdfile] [ -Mc|i|m|p ] [ -Nnx/ny ] [-I] [-Ssearch_radius]-VDESCRIPTION

grdproject will do one of two things depending whetherhas 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. The new nodes are filled based on a simple weighted average of nearby points. Aliasing is avoided by using sensible values for the search_radius. 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. No space between the option flag and the associated arguments. Use upper case for the option flags and lower case for modifiers. in_grdfile 2-D binary grd file to be transformed.-ISelects the map projection. Scale is UNIT/degree, 1:xxxxx, or width in UNIT (upper case modifier). UNIT is cm, inch, or m, depend- ing on the MEASURE_UNIT setting in .gmtdefaults, but this can be overridden on the command line by appending the c, i, or m to the scale/width value. CYLINDRICAL PROJECTIONS: -Jclon0/lat0/scale (Cassini) -Jjlon0/scale (Miller)-J(Mercator - Greenwich and Equator as origin) -Jmlon0/lat0/scale (Mercator - Give meridian and standard parallel) -Joalon0/lat0/azimuth/scale (Oblique Mercator - point and azimuth) -Joblon0/lat0/lon1/lat1/scale (Oblique Mercator - two points) -Joclon0/lat0/lonp/latp/scale (Oblique Mercator - point and pole) -Jqlon0/scale (Equidistant Cylindrical Projection (Plate Carree)) -Jtlon0/scale (TM - Transverse Mercator, with Equator as y = 0) -Jtlon0/lat0/scale (TM - Transverse Mercator, set origin) -Juzone/scale (UTM - Universal Transverse Mercator) -Jylon0/lats/scale (Basic Cylindrical Projection) AZIMUTHAL PROJECTIONS: -Jalon0/lat0/scale (Lambert). -Jelon0/lat0/scale (Equidistant). -Jflon0/lat0/horizon/scale (Gnomonic). -Jglon0/lat0/scale (Orthographic). -Jslon0/lat0/[slat/]scale (General Stereographic) CONIC PROJECTIONS: -Jblon0/lat0/lat1/lat2/scale (Albers) -Jdlon0/lat0/lat1/lat2/scale (Equidistant) -Jllon0/lat0/lat1/lat2/scale (Lambert) MISCELLANEOUS PROJECTIONS: -Jhlon0/scale (Hammer) -Jilon0/scale (Sinusoidal) -Jk[f|s]lon0/scale (Eckert IV (f) and VI (s)) -Jnlon0/scale (Robinson) -Jrlon0/scale (Winkel Tripel) -Jvlon0/scale (Van der Grinten) -Jwlon0/scale (Mollweide) NON-GEOGRAPHICAL PROJECTIONS: -Jp[a]scale[/origin] (polar (theta,r) coordinates, optional a for azimuths and offset theta [0]) -Jxx-scale[l|ppow][/y-scale[l|ppow]] (Linear, log, and power scaling) More details can be found in the psbasemap manpages.-Jmscalewest, 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.-ROPTIONS

Force 1:1 scaling, i.e., output (or input, see -I) data are in actual projected meters. To specify other units, append k (km), m (mile),n (nautical mile), i (inch), c (cm), or p (points). Without-A, the output (or input, see -I) are in the units specified by MEASURE_UNIT (but see -M).-ALet projected coordinates be relative to projection center [Default is relative to lower left corner].-CSet the grid spacing for the new grid. Append m for minutes, c for seconds.-DSet the resolution for the new grid in dots pr inch.-EToggle between pixel and gridline registration [Default is same as input].-FSpecify the name of the output netCDF grd file.-GDo the Inverse transformation, from rectangular to geographical.-IAppend c, i, or m to indicate that cm, inch, or meter should be the projected measure unit [Default is set by MEASURE_UNIT in .gmt- defaults]. Cannot be used with-M-A.Set the number of grid nodes in the new grid.-NSet the search radius for the averaging procedure [Default avoids aliasing].-SSelects verbose mode, which will send progress reports to stderr [Default runs "silently"].-VEXAMPLES

To transform the geographical grid dbdb5.grd onto a pixel Mercator grid at 300 dpi, run grdproject dbdb5.grd -R20/50/12/25-E300-Jm0.25i-Gdbdb5_merc.grd To inversely transform the file topo_tm.grd back onto a geographical grid try grdproject topo_tm.grd -R-80/-70/20/40 -Jt-75/1:500000-F-D5m-I-Gtopo.grd This assumes, of course, that the coordinates in topo_tm.grd were created with the same projection parameters. To inversely transform the file topo_utm.grd (which is in UTM meters) back onto a geographical grid we specify a one-to-one mapping with meter as the measure unit: grdproject topo_utm.grd -R203/205/60/65 -Ju5/1:1-V-Mm-I-Gtopo.grd-VRESTRICTIONS

The boundaries of a projected (rectangular) data set will not necessarily give rectangular geographical boundaries (Mercator is one excep- tion). 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 interrested in.SEE ALSO

gmt(1gmt), gmtdefaults(1gmt), mapproject(1gmt) 1 Jan 2004 GRDPROJECT(l)