Geo dataset (GeoNames) — access contract

Partitioned location data for country-adaptive form fields. Base path at runtime: /assets/data/geo/. Drill-down: country → admin1 (region/state/județ) → [admin2 (county), only where it exists] → city.

Partitioning keeps the Cloudflare Pages deployment under its 20,000-file limit: cities are one file per admin1, not per county.

Files

Client drill-down

  1. country change → fetch <CC>/admin1.json; label region from labels[cc].admin1.
  2. region change → if hasAdmin2: fetch <CC>/<A1>/admin2.json (counties) AND <CC>/<A1>/cities.json (objects); show all region cities until a county is picked. Else: fetch <CC>/<A1>/cities.json (strings).
  3. county change (hasAdmin2 only) → filter the already-loaded cities to those whose a2 equals the selected county code.

Storage mapping (profiles)

country = country name, region = admin1 name, county = admin2 name (empty when no county tier), city = city name.

Notes