cartagen.hull_delaunay

Contents

cartagen.hull_delaunay#

hull_delaunay(points, length)#

Create the hull of a set of points using the Delaunay triangulation.

This algorithm was described by Duckham et al. [1] and is also described in Galton & Duckham [2] It first computes the Delaunay triangulation of the points, and then removes iteratively the boundary edges that are longer than a given parameter.

Parameters:
  • points (list of Point) – The set of points.

  • length (float) – The length in meters below which the Delaunay triangles edges are removed.

Returns:

Polygon

Warning

This algorithm cannot create multiple polygons, unlike hull_swinging_arm(). Using a length too low can produce an invalid geometry.

See also

hull_swinging_arm

Create a polygon from a set of points using the swinging arm algorithm.

References

Examples

>>> points = [ Point(1, 1), Point(6, 6), Point(1, 6), Point(6, 5), Point(2, 4), Point(2, 1), Point(1, 4) ]
>>> delaunay_hull(points, 2.0)
<POLYGON ((1 1, 1 4, 1 6, 6 6, 6 5, 2 4, 2 1, 1 1))>

(Source code)

../_images/hull_delaunay.png