All changes

This commit is contained in:
Andras Schmelczer 2026-03-14 21:36:00 +00:00
parent 593f380581
commit 49f7ec2f5a
60 changed files with 1783 additions and 679 deletions

View file

@ -2,6 +2,7 @@ from collections import defaultdict
import numpy as np
from scipy.spatial import Voronoi
from scipy.spatial.qhull import QhullError
from shapely import make_valid
from shapely.geometry import MultiPolygon, Polygon
from shapely.ops import unary_union
@ -67,7 +68,7 @@ def compute_voronoi_regions(
try:
vor = Voronoi(all_points)
except Exception:
except (ValueError, QhullError):
# Fallback: split boundary equally among all postcodes present
all_pcs = list(dict.fromkeys(unique_pcs))
if len(all_pcs) == 1: