- class momepy.CheckTessellationInput(gdf, shrink=0.4, collapse=True, split=True, overlap=True)#
Check input data for
Tessellationfor potential errors.
Tessellationrequires 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.
CheckTessellationInputwill 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
- 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__(gdf, shrink=0.4, collapse=True, split=True, overlap=True)#
__init__(gdf[, shrink, collapse, split, overlap])