momepy.verify_tessellation#
- momepy.verify_tessellation(tessellation, geometry)[source]#
Check whether result matches buildings and contains only Polygons.
Checks if the generated tessellation fully matches the input buildings, i.e. if there are all building indices present in the tessellation. Also checks if there are any MultiPolygons present in the tessellation. The former is often caused by buildings collapsing during the generation process, the latter is usually caused by errors in the input geometry, overlapping buildings, or narrow links between parts of the building.
- Parameters:
- tessellationGeoSeries | GeoDataFrame
tessellation geometry
- geometryGeoSeries | GeoDataFrame
building geometry used to generate tessellation
- Returns:
- tuple(excluded, multipolygons)
Tuple of indices of building IDs not present in tessellations and MultiPolygons.
Examples
>>> path = momepy.datasets.get_path("bubenec") >>> buildings = geopandas.read_file(path, layer="buildings")
Define a limit used to clip the extent:
>>> limit = momepy.buffered_limit(buildings, buffer="adaptive")
Generate tessellation:
>>> tessellation = momepy.morphological_tessellation(buildings)
Verify the result.
>>> excluded, multipolygons = momepy.verify_tessellation(tessellation, buildings)