From aa867cb70489041cd7fdbed61ebec85a52e38ed6 Mon Sep 17 00:00:00 2001 From: Fabian Hofmann Date: Tue, 7 Jun 2022 15:00:57 +0200 Subject: [PATCH] Update scripts/build_bus_regions.py Co-authored-by: Fabian Neumann --- scripts/build_bus_regions.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/build_bus_regions.py b/scripts/build_bus_regions.py index 382a32e8..89765ed9 100644 --- a/scripts/build_bus_regions.py +++ b/scripts/build_bus_regions.py @@ -107,15 +107,6 @@ def voronoi_partition_pts(points, outline, no_multipolygons=False): polygons.append(poly) - if no_multipolygons: - def demultipolygon(poly): - try: - # for a MultiPolygon pick the part with the largest area - poly = max(poly.geoms, key=lambda pg: pg.area) - except: - pass - return poly - polygons = [demultipolygon(poly) for poly in polygons] return np.array(polygons, dtype=object)