TRIANGULATE
Section: Misc. Reference Manual Pages (l)
Updated: DATE
Index
Return to Main Contents
#ifdef SI
#define UNIT cm
#define LEN 15
#define SCALE -JM1
#else
#define UNIT inch
#define LEN 6
#define SCALE -JM6
#endif
NAME
triangulate - Perform optimal Delauney triangulation and gridding
SYNOPSIS
triangulate infiles [ -Ggrdfile ] [ -H ] [ -Ix_inc[m|c][/y_inc[m|c]] ] [ -Jparameters ] [ -M[flag] ]
[ -Rwest/east/south/north ] [ -V ] [ -Z ] [ -: ] [ -b[i|o][d] ]
DESCRIPTION
triangulate reads one or more ASCII [or binary] files (or standard input) containing x,y[,z] and
performs Delauney triangulation, i.e., it find how the points should be connected to give
the most equilateral triangulation possible. If a map projection 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. The id numbers refer to the points position in the input file.
As an option, you may choose to create a multiple segment file that can be piped through
psxy to draw the triangulation network. If G -I are set a grid will be calculated based
on the surface defined by the planar triangles.
- infiles
-
Data files with the point coordinates in ascii (or binary; see -b). If no files are given the standard input is read.
OPTIONS
#include "explain_-H.txt"
-I
x_inc [and optionally y_inc] sets the grid size for optional grid output (see -G). Append m to indicate minutes or c to indicate seconds.
#include "explain_-j.txt"
- -M
-
Output triangulation network as multiple line segments separated by a record whose first
character is flag [>]. To plot, use psxy with the -M option (see Examples).
#include "explain_-R.txt"
#include "explain_-V.txt"
- -Z
-
Controls whether binary data file has two or three columns [2]. Ignored if -b
is not set.
#include "explain_-t.txt"
- -b
-
Selects binary input and output mode. Append i or o to select binary input or output only. [Default
is ASCII]. Node ids are stored as binary 4-byte integer triplets. Append d to indicate double precision for binary data
(if both binary input and output are selected they will have the same precision). -bo is ignored if -M is selected.
EXAMPLES
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, try
triangulate samples.xyz -bo -R0/30/0/30 -I2 -Gsurf.grd > samples.ijk
To draw the optimal Delauney triangulation network based on the same file using a
LEN-UNIT-wide Mercator map, try
triangulate samples.xyz -M -R-100/-90/30/34 SCALE | psxy -M -R-100/-90/30/34 SCALE
-W2 -B1 > network.ps
SEE ALSO
gmt, pscontour
#include "refs.i"
Watson, D. F., 1982, Acord: Automatic contouring of raw data, Comp. & Geosci., 8, 97-101.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- EXAMPLES
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 07:10:52 GMT, January 07, 2025