SPHTRIANGULATE(1gmt) | GMT | SPHTRIANGULATE(1gmt) |
sphtriangulate - Delaunay or Voronoi construction of spherical lon,lat data
sphtriangulate [ table ] [ -A ] [ -C ] [ -D ] [ -Lunit ] [ -Nnfile ] [ -Qd|v ] [ -T ] [ -V[level] ] [ -bbinary ] [ -dnodata ] [ -eregexp ] [ -hheaders ] [ -iflags ] [ -:[i|o] ]
Note: No space is allowed between the option flag and the associated arguments.
sphtriangulate reads one or more ASCII [or binary] files (or standard input) containing lon, lat and performs a spherical Delaunay triangulation, i.e., it determines how the points should be connected to give the most equilateral triangulation possible on the sphere. Optionally, you may choose -Qv which will do further processing to obtain the Voronoi polygons. Normally, either set of polygons will be written as closed fillable segment output; use -T to write unique arcs instead. As an option, compute the area of each triangle or polygon. The algorithm used is STRIPACK.
None.
The ASCII output formats of numerical data are controlled by parameters in your gmt.conf file. Longitude and latitude are formatted according to FORMAT_GEO_OUT, absolute time is under the control of FORMAT_DATE_OUT and FORMAT_CLOCK_OUT, whereas general floating point values are formatted according to FORMAT_FLOAT_OUT. Be aware that the format in effect can lead to loss of precision in ASCII output, which can lead to various problems downstream. If you find the output is not written with enough precision, consider switching to binary output (-bo if available) or specify more decimals using the FORMAT_FLOAT_OUT setting.
To triangulate the points in the file testdata.txt, and make a Voronoi diagram via psxy, use
gmt sphtriangulate testdata.txt -Qv | psxy -Rg -JG30/30/6i -L -P -W1p -Bag | gv -
To compute the optimal Delaunay triangulation network based on the multiple segment file globalnodes.d and save the area of each triangle in the header record, try
gmt sphtriangulate globalnodes.d -Qd -A > global_tri.d
gmt, triangulate, sphdistance
Renka, R, J., 1997, Algorithm 772: STRIPACK: Delaunay Triangulation and Voronoi Diagram on the Surface of a Sphere, AMC Trans. Math. Software, 23(3), 416-434.
2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe
May 21, 2019 | 5.4.5 |