Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > os > by-pkgid > 4b194777eaf705e440bb2ce282d32772 > files > 919

GMT-doc-4.5.3-3.fc14.noarch.rpm

<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Wed Jul 14 08:43:25 2010 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title>GMT2RGB</title>

</head>
<body bgcolor="#ffffff">

<h1 align=center>GMT2RGB</h1>

<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#OPTIONS">OPTIONS</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>

<hr>


<a name="NAME"></a>
<h2>NAME</h2>


<p style="margin-left:11%; margin-top: 1em">gmt2rgb &minus;
Converting a grid file, a raw, or a Sun raster file to r/g/b
grids</p>

<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>


<p style="margin-left:11%; margin-top: 1em"><b>gmt2rgb</b>
<i>infile</i> <b>&minus;G</b><i>template</i> [
<b>&minus;C</b><i>cptfile</i> ] [ <b>&minus;F</b> ] [
<b>&minus;I</b><i>xinc</i>[<b>m</b>|<b>c</b>][/<i>yinc</i>[<b>m</b>|<b>c</b>]]
] [ <b>&minus;L</b><i>layer</i> ] [
<b>&minus;R</b><i>xmin</i>/<i>xmax</i>/<i>ymin</i>/<i>ymax</i>[<b>r</b>]
] [ <b>&minus;V</b> ] [
<b>&minus;W</b><i>width</i>/<i>height</i>[/<i>n_bytes</i>]</p>

<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>


<p style="margin-left:11%; margin-top: 1em"><b>gmt2rgb</b>
reads one of three types of input files: (1) A Sun 8-, 24-,
or 32-bit raster file; we the write out the red, green, and
blue components (0-255 range) to separate grid files. Since
the raster file header is limited you may use the
<b>&minus;R</b>, <b>&minus;F</b>, <b>&minus;I</b> options to
set a complete header record [Default is simply based on the
number of rows and columns]. (2) A binary 2-D grid file; we
then convert the z-values to red, green, blue via the
provided cpt file. Optionally, only write out one of the r,
g, b, layers. (3) A RGB or RGBA raw raster file. Since raw
rasterfiles have no header, you have to give the image
dimensions via the <b>&minus;W</b> option.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">


<p style="margin-top: 1em" valign="top"><i>infile</i></p></td>
<td width="2%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">The (1) Sun raster
file, (2) 2-D binary grid file, or (3) raw raster file to be
converted.</p> </td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">



<p style="margin-top: 1em" valign="top"><b>&minus;G</b></p> </td>
<td width="2%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Provide an output
name template for the three output grids. The template
should be a regular grid file name except it must contain
the string %c which on output will be replaced by r, g, or
b.</p> </td>
</table>

<a name="OPTIONS"></a>
<h2>OPTIONS</h2>


<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;C</b></p> </td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">name of the color
palette table (for 2-D binary input grid only).</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;F</b></p> </td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Force pixel node
registration [Default is gridline registration]. (Node
registrations are defined in <b><A HREF="GMT.html">GMT</A></b> Cookbook Appendix B
on grid file formats.)</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;I</b></p> </td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top"><i>x_inc</i> [and
optionally <i>y_inc</i>] is the grid spacing. Optionally,
append a suffix modifier. <b>Geographical (degrees)
coordinates</b>: Append <b>m</b> to indicate arc minutes or
<b>c</b> to indicate arc seconds. If one of the units
<b>e</b>, <b>k</b>, <b>i</b>, or <b>n</b> is appended
instead, the increment is assumed to be given in meter, km,
miles, or nautical miles, respectively, and will be
converted to the equivalent degrees longitude at the middle
latitude of the region (the conversion depends on
<b><A HREF="gmtdefaults.html#ELLIPSOID">ELLIPSOID</A></b>). If /<i>y_inc</i> is given but set to 0 it
will be reset equal to <i>x_inc</i>; otherwise it will be
converted to degrees latitude. <b>All coordinates</b>: If
<b>=</b> is appended then the corresponding max <i>x</i>
(<i>east</i>) or <i>y</i> (<i>north</i>) 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
<i>number of nodes</i> desired by appending <b>+</b> 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
Appendix B for details. Note: if
<b>&minus;R</b><i>grdfile</i> is used then grid spacing has
already been initialized; use <b>&minus;I</b> to override
the values.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;L</b></p> </td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Output only the
specified layer (r, g, or b). [Default outputs all 3
layers].</p> </td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;R</b></p> </td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top"><i>xmin</i>,
<i>xmax</i>, <i>ymin</i>, and <i>ymax</i> specify the Region
of interest. For geographic regions, these limits correspond
to <i>west, east, south,</i> and <i>north</i> and you may
specify them in decimal degrees or in
[+-]dd:mm[:ss.xxx][W|E|S|N] format. Append <b>r</b> if lower
left and upper right map coordinates are given instead of
w/e/s/n. The two shorthands <b>&minus;Rg</b> and
<b>&minus;Rd</b> stand for global domain (0/360 and
-180/+180 in longitude respectively, with -90/+90 in
latitude). Alternatively, specify the name of an existing
grid file and the <b>&minus;R</b> settings (and grid
spacing, if applicable) are copied from the grid. For
calendar time coordinates you may either give (a) relative
time (relative to the selected <b><A HREF="gmtdefaults.html#TIME_EPOCH">TIME_EPOCH</A></b> and in the
selected <b><A HREF="gmtdefaults.html#TIME_UNIT">TIME_UNIT</A></b>; append <b>t</b> to
<b>&minus;JX</b>|<b>x</b>), or (b) absolute time of the form
[<i>date</i>]<b>T</b>[<i>clock</i>] (append <b>T</b> to
<b>&minus;JX</b>|<b>x</b>). At least one of <i>date</i> and
<i>clock</i> must be present; the <b>T</b> is always
required. The <i>date</i> string must be of the form
[-]yyyy[-mm[-dd]] (Gregorian calendar) or yyyy[-Www[-d]]
(ISO week calendar), while the <i>clock</i> string must be
of the form hh:mm:ss[.xxx]. The use of delimiters and their
type and positions must be exactly as indicated (however,
input, output and plot formats are customizable; see
<b><A HREF="gmtdefaults.html">gmtdefaults</A></b>).</p> </td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;V</b></p> </td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Selects verbose
mode, which will send progress reports to stderr [Default
runs &quot;silently&quot;].</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;W</b></p> </td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Sets the size of
the raw raster file. By default an RGB file (which has 3
bytes/pixel) is assumed. For RGBA files use <i>n_bytes</i> =
4. Use <b>&minus;W</b> for guessing the image size of a RGB
raw file, and <b>&minus;W</b><i>=/=/4</i> if the raw image
is of the RGBA type. Notice that this might be a bit slow
because the guessing algorithm makes uses of FFTs.</p></td>
</table>

<a name="EXAMPLES"></a>
<h2>EXAMPLES</h2>


<p style="margin-left:11%; margin-top: 1em">To use the
color palette topo.cpt to create r, g, b component grids
from hawaii_grv.grd file, use</p>

<p style="margin-left:11%; margin-top: 1em"><b>gmt2rgb</b>
hawaii_grv.grd <b>&minus;C</b>topo.cpt
<b>&minus;G</b>hawaii_grv_%c.grd</p>

<p style="margin-left:11%; margin-top: 1em">To output the
red component from the Sun raster radiation.ras file,
use</p>

<p style="margin-left:11%; margin-top: 1em"><b>gmt2rgb</b>
radiation.ras <b>&minus;L</b>r
<b>&minus;G</b>comp_%c.grd</p>

<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>



<p style="margin-left:11%; margin-top: 1em"><i><A HREF="gmtdefaults.html">gmtdefaults</A></i>(1),
<i><A HREF="GMT.html">GMT</A></i>(1), <i><A HREF="grdedit.html">grdedit</A></i>(1), <i><A HREF="grdimage.html">grdimage</A></i>(1),
<i><A HREF="grdmath.html">grdmath</A></i>(1), <i><A HREF="grdview.html">grdview</A></i>(1)</p>
<hr>
</body>
</html>