class momepy.CheckTessellationInput(gdf, shrink=0.4, collapse=True, split=True, overlap=True)[source]

Check input data for Tessellation for potential errors.

Tessellation requires data of relatively high level of precision and there are three particular patterns causing issues.

1. Features will collapse into empty polygon - these do not have tessellation cell in the end.

2. Features will split into MultiPolygon - at some cases, features with narrow links between parts split into two during ‘shrinking’. In most cases that is not an issue and resulting tessellation is correct anyway, but sometimes this result in a cell being MultiPolygon, which is not correct.

3. Overlapping features - features which overlap even after ‘shrinking’ cause invalid tessellation geometry.

CheckTessellationInput will check for all of these. Overlapping features have to be fixed prior Tessellation. Features which will split will cause issues only sometimes, so should be checked and fixed if necessary. Features which will collapse could be ignored, but they will have to excluded from next steps of tessellation-based analysis.

gdfGeoDataFrame or GeoSeries

GeoDataFrame containing objects to be used as gdf in Tessellation

shrinkfloat (default 0.4)

distance for negative buffer

collapsebool (default True)

check for features which would collapse to empty polygon

splitbool (default True)

check for features which would split into Multi-type

overlapbool (default True)

check for overlapping features (after negative buffer)


>>> check = CheckTessellationData(df)
Collapsed features  : 3157
Split features      : 519
Overlapping features: 22
collapseGeoDataFrame or GeoSeries

features which would collapse to empty polygon

splitGeoDataFrame or GeoSeries

features which would split into Multi-type

overlapGeoDataFrame or GeoSeries

overlapping features (after negative buffer)

__init__(self, gdf, shrink=0.4, collapse=True, split=True, overlap=True)[source]

Initialize self. See help(type(self)) for accurate signature.


__init__(self, gdf[, shrink, collapse, …])

Initialize self.