From 1e9ef567a9506e6251d4ddd6f5295c8d35317388 Mon Sep 17 00:00:00 2001 From: Ho Ngoc Hai Date: Fri, 1 May 2026 13:13:26 +0700 Subject: [PATCH] =?UTF-8?q?docs(osm):=20note=202025=20VN=20admin=20reform?= =?UTF-8?q?=20=E2=80=94=20vn=5Fdistricts=20now=20holds=20ward/commune=20la?= =?UTF-8?q?yer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vietnam dropped the district administrative level in the 2025 reform (Nghị quyết về sắp xếp đơn vị hành chính). Only two levels remain: province (level=4) and ward/commune (level=6). OSM has updated tagging accordingly: every former xã/phường/thị trấn that survived the merge is now `admin_level=6`, no `admin_level=8` features for VN. Our sync confirmed this — 3,189 level=6 units inserted across 33 provinces, level=8 returns zero. The schema column "vn_districts" stays as-is to avoid a cascade-rename across IndustrialPark / ProjectDevelopment / Property FKs. Documented the semantic shift in osm-data-model.md so future ops don't think something is broken when wards are empty. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/osm-data-model.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/osm-data-model.md b/docs/osm-data-model.md index 80fa49d..f2a25b1 100644 --- a/docs/osm-data-model.md +++ b/docs/osm-data-model.md @@ -9,8 +9,8 @@ the query patterns that use them. | Table | Source | Geometry | Sync cadence | Used by | |-------|--------|----------|--------------|---------| | `vn_provinces` | OSM `boundary=administrative + admin_level=4` | MultiPolygon | Weekly (Mon 02:30 ICT) | `GeoLookupService`, KCN sync, address auto-fill | -| `vn_districts` | OSM `admin_level=6` | MultiPolygon | Weekly (Wed 02:30 ICT) | Same as above | -| `vn_wards` | OSM `admin_level=8` | MultiPolygon | Weekly (Sat 02:30 ICT) | Same as above | +| `vn_districts` | OSM `admin_level=6` | MultiPolygon | Weekly (Wed 02:30 ICT) | Same as above. **After the 2025 reform** this table effectively holds the new ward / commune layer (~3,200 units), since Vietnam dropped the district level. The schema name is kept for backwards-compat with goodgo's existing FK references. | +| `vn_wards` | OSM `admin_level=8` | MultiPolygon | Weekly (Sat 02:30 ICT) | Same as above. **Note**: after the 2025 admin reform Vietnam only uses level=4 (province) + level=6 (ward/commune). OSM doesn't currently tag any VN feature with admin_level=8, so this table will stay empty until/unless the policy changes. Kept for forward-compat. | | `Poi` | OSM nodes/ways/relations matching 20 category selectors | Point | Daily 1 category rotation (02:00 ICT) | `/poi/nearby`, `/poi/by-bbox`, listing sidebar, search filter | | `TransportLine` | OSM `route=subway|train|highway` relations | MultiLineString | Monthly | Distance scoring, planned for Phase 2 UX | | `IndustrialPark` | OSM `landuse=industrial` ways/relations | Point + MultiPolygon boundary | Monthly (1st 03:00 ICT, 4 chunks) | `/industrial/parks/*`, KCN catalog |