Constrain visible roof grouping to compact clusters
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Jens
2026-07-27 05:38:16 +02:00
parent 31c18792d1
commit f07ff5d52c
3 changed files with 42 additions and 1 deletions
@@ -179,3 +179,25 @@ def test_normalizer_merges_only_touching_visible_roof_instances(tmp_path: Path)
assert sorted(item["properties"]["source_feature_count"] for item in normalized["features"]) == [1, 2]
assert audit["accepted_source_feature_count"] == 3
assert audit["accepted_feature_count"] == 2
def test_visible_roof_merge_retains_large_touching_chains() -> None:
features = []
for index in range(13):
left = float(index)
features.append(
{
"type": "Feature",
"id": str(index),
"properties": {"source_feature_id": str(index)},
"geometry": {
"type": "Polygon",
"coordinates": [[[left, 0], [left + 1, 0], [left + 1, 1], [left, 1], [left, 0]]],
},
}
)
merged = module.merge_touching_roof_instances(features, "grb")
assert len(merged) == 13
assert {item["properties"]["label_semantics"] for item in merged} == {
"native_instance_complex_touch_group"
}