pygmt.triangulate
- class pygmt.triangulate[source]
Delaunay triangulation or Voronoi partitioning and gridding of Cartesian data.
Triangulate reads in x,y[,z] data and performs Delaunay triangulation, i.e., it finds how the points should be connected to give the most equilateral triangulation possible. If a map projection (give
region
andprojection
) 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 (line number, starting at 0 for the first line) in the input file. Ifoutgrid
andspacing
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] or Shewchuk [1996] [Default is Shewchuk if installed; typegmt get GMT_TRIANGULATE
on the command line to see which method is selected]. Furthermore, if the Shewchuk algorithm is installed then you can also perform the calculation of Voronoi polygons and optionally grid your data via the natural nearest neighbor algorithm. Note: For geographic data with global or very large extent you should consider sphtriangulate instead sincetriangulate
is a Cartesian or small-geographic area operator and is unaware of periodic or polar boundary conditions.
Methods Summary
|
Delaunay triangle based gridding of Cartesian data. |
|
Delaunay triangle based gridding of Cartesian data. |