Class PolygonTriangulator
Computes a triangulation of each polygon in a {@link Geometry}. A polygon triangulation is a non-overlapping set of triangles which cover the polygon and have the same vertices as the polygon. The priority is on performance rather than triangulation quality, so that the output may contain many narrow triangles.
Holes are handled by joining them to the shell to form a (self-touching) polygon shell with no holes. Although invalid, this can be triangulated effectively. For better-quality triangulation use ConstrainedDelaunayTriangulator.Inherited Members
Namespace: NetTopologySuite.Triangulate.Polygon
Assembly: NetTopologySuite.dll
Syntax
public class PolygonTriangulator
Constructors
| Edit this page View SourcePolygonTriangulator(Geometry)
Constructs a new triangulator.
Declaration
public PolygonTriangulator(Geometry inputGeom)
Parameters
Type | Name | Description |
---|---|---|
Geometry | inputGeom | The input geometry |
Methods
| Edit this page View SourceGetResult()
Gets the triangulation as a GeometryCollection of triangular Polygons.
Declaration
public Geometry GetResult()
Returns
Type | Description |
---|---|
Geometry | A collection of the result triangle polygons |
GetTriangles()
Gets the triangulation as a list of Tris.
Declaration
public List<Tri> GetTriangles()
Returns
Type | Description |
---|---|
List<Tri> | The list of Tris in the triangulation |
Triangulate(Geometry)
Computes a triangulation of each polygon in a geometry.
Declaration
public static Geometry Triangulate(Geometry geom)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geom | A geometry containing polygons |
Returns
Type | Description |
---|---|
Geometry | A |