Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > fa8759c1f2240ce030f5ac6d5041a2a1 > files > 473

GMT-doc-4.5.9-1.fc18.noarch.rpm

<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Wed Jan  2 08:40:11 2013 -->
<!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>TRIANGULATE</title>

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

<h1 align=center>TRIANGULATE</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="#ASCII FORMAT PRECISION">ASCII FORMAT PRECISION</a><br>
<a href="#GRID VALUES PRECISION">GRID VALUES PRECISION</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<a href="#REFERENCES">REFERENCES</a><br>

<hr>


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


<p style="margin-left:11%; margin-top: 1em">triangulate
&minus; Perform optimal Delaunay triangulation and gridding
of Cartesian data [method]</p>

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



<p style="margin-left:11%; margin-top: 1em"><b>triangulate</b>
<i>infiles</i> [ <b>&minus;Dx</b>|<b>y</b> ] [
<b>&minus;E</b><i>empty</i> ] [ <b>&minus;F</b> ] [
<b>&minus;G</b><i>grdfile</i> ] [
<b>&minus;H</b>[<b>i</b>][<i>nrec</i>] ] [
<b>&minus;I</b><i>xinc</i>[<i>unit</i>][<b>=</b>|<b>+</b>][/<i>yinc</i>[<i>unit</i>][<b>=</b>|<b>+</b>]]
] [ <b>&minus;J</b><i>parameters</i> ] [ <b>&minus;Q</b> ] [
<b>&minus;R</b><i>west</i>/<i>east</i>/<i>south</i>/<i>north</i>[<b>r</b>]
] [ <b>&minus;V</b> ] [ <b>&minus;Z</b> ] [
<b>&minus;:</b>[<b>i</b>|<b>o</b>] ] [
<b>&minus;b</b>[<b>i</b>|<b>o</b>][<b>s</b>|<b>S</b>|<b>d</b>|<b>D</b>[<i>ncol</i>]|<b>c</b>[<i>var1</i><b>/</b><i>...</i>]]
] [ <b>&minus;f</b>[<b>i</b>|<b>o</b>]<i>colinfo</i> ] [
<b>&minus;m</b>[<b>i</b>|<b>o</b>][<i>flag</i>] ]</p>

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



<p style="margin-left:11%; margin-top: 1em"><b>triangulate</b>
reads one or more ASCII [or binary] files (or standard
input) containing x,y[,z] and performs Delaunay
triangulation, i.e., it find how the points should be
connected to give the most equilateral triangulation
possible. If a map projection (give <b>&minus;R</b> and
<b>&minus;J</b>) is chosen then it is applied before the
triangulation is calculated. By default, the output is
triplets of point id numbers that make up each triangle and
is written to standard output. The id numbers refer to the
points position (line number, starting at 0 for the first
line) in the input file. As an option, you may choose to
create a multiple segment file that can be piped through
<b><A HREF="psxy.html">psxy</A></b> to draw the triangulation network. If
<b>&minus;G &minus;I</b> are set a grid will be calculated
based on the surface defined by the planar triangles. The
actual algorithm used in the triangulations is either that
of Watson [1982] [Default] or Shewchuk [1996] (if installed;
type <b>triangulate &minus;</b> to see which method is
selected). This choice is made during the <b><A HREF="GMT.html">GMT</A></b>
installation. <i><br>
infiles</i></p>

<p style="margin-left:22%;">Data files with the point
coordinates in ASCII (or binary; see <b>&minus;b</b>). If no
files are given the standard input is read.</p>

<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;D</b></p> </td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Take either the
<i>x</i>- or <i>y</i>-derivatives of surface represented by
the planar facets (only used when <b>&minus;G</b> is
set).</p> </td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



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


<p style="margin-top: 1em" valign="top">Set the value
assigned to empty nodes when <b>&minus;G</b> is set
[NaN].</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.) Only valid with <b>&minus;G</b>).</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



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


<p style="margin-top: 1em" valign="top">Use triangulation
to grid the data onto an even grid (specified with
<b>&minus;R &minus;I</b>). Append the name of the output
grid file. The interpolation is performed in the original
coordinates, so if your triangles are close to the poles you
are better off projecting all data to a local coordinate
system before using <b>triangulate</b> (this is true of all
gridding routines).</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



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


<p style="margin-top: 1em" valign="top">Input file(s) has
header record(s). If used, the default number of header
records is <b><A HREF="gmtdefaults.html#N_HEADER_RECS">N_HEADER_RECS</A></b>. Use <b>&minus;Hi</b> if
only input data should have header records [Default will
write out header records if the input data have them]. Blank
lines and lines starting with # are always skipped.</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>] sets the grid size for optional
grid output (see <b>&minus;G</b>). Append <b>m</b> to
indicate minutes or <b>c</b> to indicate seconds.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



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


<p style="margin-top: 1em" valign="top">Selects the map
projection. Scale is UNIT/degree, 1:xxxxx, or width in UNIT
(upper case modifier). UNIT is cm, inch, or m, depending on
the <b><A HREF="gmtdefaults.html#MEASURE_UNIT">MEASURE_UNIT</A></b> setting in .gmtdefaults4, but this
can be overridden on the command line by appending <b>c</b>,
<b>i</b>, or <b>m</b> to the scale/width value. When central
meridian is optional, default is center of longitude range
on <b>&minus;R</b> option. Default standard parallel is the
equator. For map height, max dimension, or min dimension,
append <b>h</b>, <b>+</b>, or <b>-</b> to the width,
respectively.</p> </td>
</table>

<p style="margin-left:22%;">More details can be found in
the <b><A HREF="psbasemap.html">psbasemap</A></b> man pages.</p>

<p style="margin-left:22%; margin-top: 1em"><b>CYLINDRICAL
PROJECTIONS:</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>&minus;Jc</b><i>lon0/lat0/scale</i>
(Cassini) <b><br>

&minus;Jcyl_stere</b>/[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
(Cylindrical Stereographic) <b><br>
&minus;Jj</b>[<i>lon0/</i>]<i>scale</i> (Miller) <b><br>
&minus;Jm</b>[<i>lon0</i>/[<i>lat0/</i>]]<i>scale</i>
(Mercator) <b><br>
&minus;Jm</b><i>lon0/lat0/scale</i> (Mercator - Give
meridian and standard parallel) <b><br>
&minus;Jo</b>[<b>a</b>]<i>lon0/lat0/azimuth/scale</i>
(Oblique Mercator - point and azimuth) <b><br>
&minus;Jo</b>[<b>b</b>]<i>lon0/lat0/lon1/lat1/scale</i>
(Oblique Mercator - two points) <b><br>
&minus;Joc</b><i>lon0/lat0/lonp/latp/scale</i> (Oblique
Mercator - point and pole) <b><br>
&minus;Jq</b>[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
(Cylindrical Equidistant) <b><br>
&minus;Jt</b><i>lon0/</i>[<i>lat0/</i>]<i>scale</i> (TM -
Transverse Mercator) <b><br>
&minus;Ju</b><i>zone/scale</i> (UTM - Universal Transverse
Mercator) <b><br>
&minus;Jy</b>[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
(Cylindrical Equal-Area)</p>

<p style="margin-left:22%; margin-top: 1em"><b>CONIC
PROJECTIONS:</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>&minus;Jb</b><i>lon0/lat0/lat1/lat2/scale</i>
(Albers) <b><br>
&minus;Jd</b><i>lon0/lat0/lat1/lat2/scale</i> (Conic
Equidistant) <b><br>
&minus;Jl</b><i>lon0/lat0/lat1/lat2/scale</i> (Lambert Conic
Conformal) <b><br>
&minus;Jpoly</b>/[<i>lon0/</i>[<i>lat0/</i>]]<i>scale</i>
((American) Polyconic)</p>

<p style="margin-left:22%; margin-top: 1em"><b>AZIMUTHAL
PROJECTIONS:</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>&minus;Ja</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
(Lambert Azimuthal Equal-Area) <b><br>
&minus;Je</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
(Azimuthal Equidistant) <b><br>
&minus;Jf</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
(Gnomonic) <b><br>
&minus;Jg</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
(Orthographic) <b><br>

&minus;Jg</b><i>lon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale</i>
(General Perspective). <b><br>
&minus;Js</b><i>lon0/lat0</i>[<i>/horizon</i>]<i>/scale</i>
(General Stereographic)</p>


<p style="margin-left:22%; margin-top: 1em"><b>MISCELLANEOUS
PROJECTIONS:</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>&minus;Jh</b>[<i>lon0/</i>]<i>scale</i>
(Hammer) <b><br>
&minus;Ji</b>[<i>lon0/</i>]<i>scale</i> (Sinusoidal) <b><br>
&minus;Jkf</b>[<i>lon0/</i>]<i>scale</i> (Eckert IV) <b><br>
&minus;Jk</b>[<b>s</b>][<i>lon0/</i>]<i>scale</i> (Eckert
VI) <b><br>
&minus;Jn</b>[<i>lon0/</i>]<i>scale</i> (Robinson) <b><br>
&minus;Jr</b>[<i>lon0/</i>]<i>scale</i> (Winkel Tripel)
<b><br>
&minus;Jv</b>[<i>lon0/</i>]<i>scale</i> (Van der Grinten)
<b><br>
&minus;Jw</b>[<i>lon0/</i>]<i>scale</i> (Mollweide)</p>


<p style="margin-left:22%; margin-top: 1em"><b>NON-GEOGRAPHICAL
PROJECTIONS:</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>&minus;Jp</b>[<b>a</b>]<i>scale</i>[<i>/origin</i>][<b>r</b>|<b>z</b>]
(Polar coordinates (theta,r)) <b><br>

&minus;Jx</b><i>x-scale</i>[<b>d</b>|<b>l</b>|<b>p</b><i>pow</i>|<b>t</b>|<b>T</b>][<i>/y-scale</i>[<b>d</b>|<b>l</b>|<b>p</b><i>pow</i>|<b>t</b>|<b>T</b>]]
(Linear, log, and power scaling)</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="4%">



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


<p style="margin-top: 1em" valign="top">Output the edges of
the Voronoi cells instead [Default is Delaunay triangle
edges]. Requires both <b>&minus;m</b> and <b>&minus;R</b>
and is only available if linked with the Shewchuk [1996]
library.</p> </td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;R</b></p> </td>
<td width="7%"></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="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;V</b></p> </td>
<td width="7%"></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="4%">



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


<p style="margin-top: 1em" valign="top">Controls whether
binary data file has two or three columns [2]. Ignored if
<b>&minus;b</b> is not set.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



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


<p style="margin-top: 1em" valign="top">Toggles between
(longitude,latitude) and (latitude,longitude) input and/or
output. [Default is (longitude,latitude)]. Append <b>i</b>
to select input only or <b>o</b> to select output only.
[Default affects both].</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



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


<p style="margin-top: 1em" valign="top">Selects binary
input. Append <b>s</b> for single precision [Default is
<b>d</b> (double)]. Uppercase <b>S</b> or <b>D</b> will
force byte-swapping. Optionally, append <i>ncol</i>, the
number of columns in your binary input file if it exceeds
the columns needed by the program. Or append <b>c</b> if the
input file is netCDF. Optionally, append
<i>var1</i><b>/</b><i>var2</i><b>/</b><i>...</i> to specify
the variables to be read. [Default is 2 input columns].</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



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


<p style="margin-top: 1em" valign="top">Selects binary
output. Append <b>s</b> for single precision [Default is
<b>d</b> (double)]. Uppercase <b>S</b> or <b>D</b> will
force byte-swapping. Optionally, append <i>ncol</i>, the
number of desired columns in your binary output file.
[Default is same as input]. Node ids are stored as binary
4-byte integer triplets. <b>&minus;bo</b> is ignored if
<b>&minus;m</b> is selected.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



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


<p style="margin-top: 1em" valign="top">Special formatting
of input and/or output columns (time or geographical data).
Specify <b>i</b> or <b>o</b> to make this apply only to
input or output [Default applies to both]. Give one or more
columns (or column ranges) separated by commas. Append
<b>T</b> (absolute calendar time), <b>t</b> (relative time
in chosen <b><A HREF="gmtdefaults.html#TIME_UNIT">TIME_UNIT</A></b> since <b><A HREF="gmtdefaults.html#TIME_EPOCH">TIME_EPOCH</A></b>),
<b>x</b> (longitude), <b>y</b> (latitude), or <b>f</b>
(floating point) to each column or column range item.
Shorthand <b>&minus;f</b>[<b>i</b>|<b>o</b>]<b>g</b> means
<b>&minus;f</b>[<b>i</b>|<b>o</b>]0<b>x</b>,1<b>y</b>
(geographic coordinates).</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



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


<p style="margin-top: 1em" valign="top">Output
triangulation network as multiple line segments separated by
a record whose first character is <i>flag</i> [&gt;]. To
plot, use <b><A HREF="psxy.html">psxy</A></b> with the <b>&minus;m</b> option (see
Examples).</p> </td>
</table>

<a name="ASCII FORMAT PRECISION"></a>
<h2>ASCII FORMAT PRECISION</h2>


<p style="margin-left:11%; margin-top: 1em">The ASCII
output formats of numerical data are controlled by
parameters in your .gmtdefaults4 file. Longitude and
latitude are formatted according to
<b><A HREF="gmtdefaults.html#OUTPUT_DEGREE_FORMAT">OUTPUT_DEGREE_FORMAT</A></b>, whereas other values are
formatted according to <b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b>. Be aware that the
format in effect can lead to loss of precision in the
output, which can lead to various problems downstream. If
you find the output is not written with enough precision,
consider switching to binary output (<b>&minus;bo</b> if
available) or specify more decimals using the
<b><A HREF="gmtdefaults.html#D_FORMAT">D_FORMAT</A></b> setting.</p>

<a name="GRID VALUES PRECISION"></a>
<h2>GRID VALUES PRECISION</h2>


<p style="margin-left:11%; margin-top: 1em">Regardless of
the precision of the input data, GMT programs that create
grid files will internally hold the grids in 4-byte floating
point arrays. This is done to conserve memory and
furthermore most if not all real data can be stored using
4-byte floating point values. Data with higher precision
(i.e., double precision values) will lose that precision
once GMT operates on the grid or writes out new grids. To
limit loss of precision when processing data you should
always consider normalizing the data prior to
processing.</p>

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


<p style="margin-left:11%; margin-top: 1em">To triangulate
the points in the file samples.xyz, store the triangle
information in a binary file, and make a grid for the given
area and spacing, use</p>


<p style="margin-left:11%; margin-top: 1em"><b>triangulate</b>
samples.xyz <b>&minus;bo &minus;R</b>0/30/0/30
<b>&minus;I</b>2 <b>&minus;G</b>surf.grd &gt;
samples.ijk</p>

<p style="margin-left:11%; margin-top: 1em">To draw the
optimal Delaunay triangulation network based on the same
file using a 15-cm-wide Mercator map, use</p>


<p style="margin-left:11%; margin-top: 1em"><b>triangulate</b>
samples.xyz <b>&minus;m &minus;R</b>-100/-90/30/34
<b>&minus;JM</b>15<b>c</b> | <b>psxy &minus;m</b>
OPR(R)-100/-90/30/34 <b>&minus;JM</b>15<b>c
&minus;W</b>0.5<b>p &minus;B</b>1 &gt; network.ps</p>

<p style="margin-left:11%; margin-top: 1em">To instead plot
the Voronoi cell outlines, try <b><br>
triangulate</b> samples.xyz <b>&minus;m &minus;Q
&minus;R</b>-100/-90/30/34 <b>&minus;JM</b>15<b>c</b> |
<b>psxy &minus;m</b> OPR(R)-100/-90/30/34
<b>&minus;JM</b>15<b>c &minus;W</b>0.5<b>p &minus;B</b>1
&gt; cells.ps</p>

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


<p style="margin-left:11%; margin-top: 1em"><i><A HREF="GMT.html">GMT</A></i>(1),
<i><A HREF="pscontour.html">pscontour</A></i>(1)</p>

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


<p style="margin-left:11%; margin-top: 1em">Watson, D. F.,
1982, Acord: Automatic contouring of raw data, <i>Comp.
&amp; Geosci., 8</i>, 97&minus;101. <br>
Shewchuk, J. R., 1996, Triangle: Engineering a 2D Quality
Mesh Generator and Delaunay Triangulator, First Workshop on
Applied Computational Geometry (Philadelphia, PA), 124-133,
ACM, May 1996. <br>
 www.cs.cmu.edu/~quake/triangle.html</p>
<hr>
</body>
</html>