geopandas.GeoSeries.constrained_delaunay_triangles#
- GeoSeries.constrained_delaunay_triangles()[source]#
Returns a
GeoSeries
with the constrained Delaunay triangulation of polygons.A constrained Delaunay triangulation requires the edges of the input polygon(s) to be in the set of resulting triangle edges. An unconstrained delaunay triangulation only triangulates based on the vertices, hence triangle edges could cross polygon boundaries.
Requires Shapely >= 2.1.
Added in version 1.1.0.
See also
GeoSeries.delaunay_triangles
Delaunay triangulation
Examples
>>> from shapely.geometry import Polygon >>> s = geopandas.GeoSeries([Polygon([(0, 0), (1, 1), (0, 1)])]) >>> s 0 POLYGON ((0 0, 1 1, 0 1, 0 0)) dtype: geometry
>>> s.constrained_delaunay_triangles() 0 GEOMETRYCOLLECTION (POLYGON ((0 0, 0 1, 1 1, 0... dtype: geometry