momepy.CheckTessellationInput

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.

Parameters:
gdf : GeoDataFrame or GeoSeries

GeoDataFrame containing objects to be used as gdf in Tessellation

shrink : float (default 0.4)

distance for negative buffer

collapse : bool (default True)

check for features which would collapse to empty polygon

split : bool (default True)

check for features which would split into Multi-type

overlap : bool (default True)

check for overlapping features (after negative buffer)

collapse[source]

features which would collapse to empty polygon

Type:

GeoDataFrame or GeoSeries

split[source]

features which would split into Multi-type

Type:

GeoDataFrame or GeoSeries

overlap[source]

overlapping features (after negative buffer)

Type:

GeoDataFrame or GeoSeries

Examples

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