From 4dfed1115b1fea617b2c0bfd050d39717cd40fd0 Mon Sep 17 00:00:00 2001 From: "Matt Johnson (via Claude)" Date: Sun, 7 Jun 2026 07:55:28 +0000 Subject: [PATCH] fix(normalizer): restrict Photon OSM values to city/town/village Remove hamlet, suburb, and locality from _TOWN_OSM_VALUES so the nearest_town Photon lookup only returns meaningful population centers, avoiding misleading anchors from tiny named places. Co-Authored-By: Claude Opus 4.6 --- meshai/central_normalizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshai/central_normalizer.py b/meshai/central_normalizer.py index 66dfdad..689ce44 100644 --- a/meshai/central_normalizer.py +++ b/meshai/central_normalizer.py @@ -257,7 +257,7 @@ PHOTON_RADIUS_KM = 80 # ≈ 50 miles PHOTON_LIMIT = 10 # OSM place classes we accept as "town". Suburb included for metro coverage; # locality is rare but valid for tiny rural places. -_TOWN_OSM_VALUES = frozenset({"city", "town", "village", "hamlet", "suburb", "locality"}) +_TOWN_OSM_VALUES = frozenset({"city", "town", "village"}) # Process-lifetime LRU cache keyed by H3 cell (resolution 7 ≈ 5km hexagons).