geometry

alpha_shape(coordinates: Union[numpy.ndarray, shapely.geometry.MultiPoint, geopandas.GeoDataFrame, sensai.clustering.clustering_base.EuclideanClusterer.Cluster], alpha=0.5)[source]

Compute the alpha shape of a set of points. Based on this implementation. In contrast to the standard definition of the parameter alpha here we normalize it by the mean edge size of the cluster. This results in similar “concavity properties” of the resulting shapes for different coordinate sets and a fixed alpha.

Parameters
  • coordinates – a suitable iterable of 2-dimensional coordinates

  • alpha – alpha value to influence the gooeyness of the border. Larger numbers don’t fall inward as much as smaller numbers.

Returns

a shapely Polygon