shapely.coverage_is_valid

shapely.coverage_is_valid#

coverage_is_valid(geometry, gap_width=0.0, **kwargs)#

Verify if a coverage is valid.

Note

‘coverage_is_valid’ requires at least GEOS 3.12.0.

The coverage is represented by an array of polygonal geometries with exactly matching edges and no overlap.

A valid coverage may contain holes (regions of no coverage). However, sometimes it might be desirable to detect narrow gaps as invalidities in the coverage. The gap_width parameter allows to specify the maximum width of gaps to detect. When gaps are detected, this function will return False and the coverage_invalid_edges function can be used to find the edges of those gaps.

Geometries that are not Polygon or MultiPolygon are ignored.

Added in version 2.1.0.

Parameters:
geometryarray_like

Array of geometries to verify.

gap_widthfloat, default 0.0

The maximum width of gaps to detect.

**kwargs

See NumPy ufunc docs for other keyword arguments.

Returns:
bool