# Self-hosted place search

Place names, aliases, administrative labels and postal records: [GeoNames](https://www.geonames.org/), licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Source readmes are included alongside this file. GeoNames supplies these records without a completeness or accuracy warranty.

Indian postal supplement: Department of Posts, Ministry of Communications, [All India Pincode Directory till last month](https://www.data.gov.in/resource/all-india-pincode-directory-till-last-month). District names and local-language aliases: Ministry of Panchayati Raj, [Local Government Directory (LGD) — Districts](https://data.gov.in/resource/local-government-directory-lgd-districts). These datasets are used under the [Government Open Data License — India](https://data.gov.in/godl). Neither government provider endorses these websites or their reports. The spelling “Shaheed Bhagat Singh Nagar” and abbreviation “SBS Nagar” are also verified against the [district government's website](https://nawanshahr.nic.in/).

Government-data adaptations: cleaned post-office suffixes, matched district identities by state and unambiguous Census codes/names, retained older names as search aliases, deduplicated postal localities by state/name/PIN, and added only records with plausible Indian coordinates and a confirmed Asia/Kolkata time zone. A post-office point is an approximate locality, not a verified birth address. Missing coordinates are never invented and districts are never substituted as birth-location centroids. `india-coverage.json` records the source hashes, retrieval time, accepted/skipped counts and unmatched districts. Source datasets may lag administrative changes; a recent retrieval does not mean every record is recently updated.

The Mandi Gobindgarh town name is verified against the [Fatehgarh Sahib district website](https://fatehgarhsahib.nic.in/about-district/); its spaced and joined spellings are search aliases for Gobindgarh in that district only. The original GeoNames coordinates are retained.

Postal-coordinate time zones: generated with `geo-tz` 8.1.9, using its comprehensive `geo-tz/all` dataset, not the since-1970 or current-offset-only datasets. The package code is MIT licensed. Boundary data originate from [timezone-boundary-builder](https://github.com/evansiroky/timezone-boundary-builder) and [OpenStreetMap contributors](https://www.openstreetmap.org/copyright), under [ODbL 1.0](https://opendatacommons.org/licenses/odbl/1-0/). The distributed combined/derived database is made available under ODbL 1.0, with the GeoNames attribution retained for its CC BY 4.0 components. The machine-readable database is the `manifest.json`, country indexes and record shards hosted in this directory; the open importer and row format are described in the website source repository.

Adaptations: populated-place filtering, Indian locality supplement, joined administrative labels, searchable aliases, country shards, postal-zone lookup and indexing. Ambiguous or ocean-only postal zones are left empty for manual confirmation. `provenance.json` records input hashes and build information.

Download sources: [worldwide cities500](https://download.geonames.org/export/dump/cities500.zip), [India](https://download.geonames.org/export/dump/IN.zip), [postal areas](https://download.geonames.org/export/zip/allCountries.zip), and GeoNames country/admin code tables in the [gazetteer directory](https://download.geonames.org/export/dump/).

Machine-readable format: `manifest.json` lists each country's index path. Each index contains `shards` (all its record files) and either `prefixes` or `buckets` (search-index files). Data scripts assign a JSON value to `globalThis.CMK_GEO_DATA[relativePath]`. Record rows are `[id, name, state, district, latitude, longitude, timeZone, kind, population, aliases, postalCode]`. `kind` is `place` or `postal`; an empty `timeZone` means unresolved. These files provide the complete distributed derived database, not just a sample.

Coverage: GeoNames `cities500` worldwide, populated places from `IN.zip`, `export/zip/allCountries.zip`, and the Indian government supplement described above. These are not all world villages or all postal codes. Several countries have only partial postal codes; see `postal-readme.txt`. Postal coordinates may be estimated area centres or post-office points. Do not interpret these points as a verified hospital/address or district-wide birth location. The website's astronomy tools retain their existing latitude limits.
