Download the PHP package survos/geonames-bundle without Composer
On this page you can find all versions of the php package survos/geonames-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package geonames-bundle
Geonames Bundle
survos/geonames-bundle is the GeoNames authority-list bundle for packaged SQLite place databases.
The runtime model is intentionally small:
- fetch a published authority database
- store it locally
- query it through a service such as
GeoService
Runtime Databases
Published databases:
geo.sqlitecontainscountry,admin1,admin2, and alias lookups for every country GeoNames covers<countryCode>.sqlite(e.g.us.sqlite,hu.sqlite) contains that country's cities (citytable), name-lookup aliases (aliastable), and locale-specific alternate names (alt_nametable — see below)
GeoNames provides the canonical ids, so the shared runtime base is geo.sqlite, with country-specific city databases layered on top.
Scope: what this bundle is not
GeoNames covers countries, administrative regions, and populated places (cities/towns) — it is not comprehensive for individual schools, stores, churches, or other points of interest, and this bundle doesn't try to make it one. For that layer, two companion bundles:
survos/place-map-bundle— a curated point/polygon library, one Nominatim query at a time.survos/poi-bundle— bulk/automated matching of a literal name (e.g. from a facet tag) against OSM features within a city this bundle already resolved.
See survos/mono#28 for how the split was decided.
Locale-specific alternate names (alt_name)
Each <countryCode>.sqlite also carries an alt_name table (geoname_id, iso_language,
alternate_name, is_preferred, is_short, is_colloquial, is_historic) sourced from GeoNames'
per-country alternatenames/<CC>.zip export — the real language-tagged data (German "Wien" vs.
French "Vienne" vs. English "Vienna" for the same geonameId), not the untagged alternatenames
convenience column already on city rows. Query it through:
Cities only for now — country/admin1/admin2 alt names in geo.sqlite aren't wired up yet (see
PLAN.md). Background: survos/mono#26.
Build Workflow
Build-time tooling is separate from the public bundle command, so the published bundle itself stays
light — admin/ has its own dev dependencies (composer install inside bu/geonames-bundle) and
never ships to consumer apps.
Admin console (admin/admin.php, a standalone Symfony Console app):
download fetches, per requested country, both <CC>.zip (cities) and alternatenames/<CC>.zip
(locale-specific alternate names — see above) alongside the shared countryInfo.txt,
admin1CodesASCII.txt, admin2Codes.txt, timeZones.txt, hierarchy.zip. build --force parses
those files directly into SQLite with prepared statements — no ORM — and refreshes the dataset-card
README.md/datasets.jsonl in the output directory.
One-shot: download + build + publish
admin/publish.sh runs the full pipeline — download, build, and hf upload to the
museado/geonames-data Hugging Face dataset — for a country or every country:
Requires the hf CLI
(pip install -U huggingface_hub[cli]) logged in with write access to the dataset repo
(hf auth login) unless SKIP_UPLOAD=1.
Publishing To Hugging Face
Each Hugging Face dataset directory contains a README.md dataset card, datasets.jsonl, geo.sqlite,
and one <countryCode>.sqlite per built country. survos:geo (the runtime bundle command, below)
fetches those published files rather than rebuilding them locally.
Installing The Bundle
Fetching The Authority
The public Symfony command:
fetches the published SQLite databases straight from the museado/geonames-data Hugging Face
dataset into GeoService::sqliteDir() — no auth needed, it's a public repo.
Fetch strategy (cache/retry/resume)
survos:geo uses two different survos/fetch-bundle services for two different jobs — don't
reach for the wrong one if extending this command:
- Listing published files (
--all, the HF Hub tree API call) goes throughPersistentFetcherInterface— small JSON, cached forever (untilforget()/force_fetch) in a SQLite pool atvar/data/fetch_cache.db. Retried up to 5 times with full-jitter exponential backoff (200ms base, 10s cap) on transport errors/429/5xx. - Downloading the
.sqlitefiles themselves (up to ~3.4 GB total) goes throughChunkDownloader, notPersistentFetcher—PersistentFetcherbuffers the whole response into the cache pool, which is fine for JSON and wrong for gigabytes.ChunkDownloaderstreams straight to disk (constant memory), resumes via HTTPRangeif a transfer drops partway (<file>.sqlite.part), and retries transient failures independently of the listing cache.--forcepassesoverwrite: truethrough to it.
Before 2026-08-08 download() was a hand-rolled stream-to-disk loop with no resume — a
dropped 3 GB transfer restarted from byte 0.
Using The Bundle
The runtime API will stay lookup-oriented.
Example:
We will refine the query methods and return values later. For now, the design center is local lookup against fetched authority data.
See PLAN.md for the CSV layout and next migration steps.
All versions of geonames-bundle with dependencies
survos/fetch-bundle Version ^2.5
survos/jsonl-bundle Version ^2.5
symfony/config Version ^8.1
symfony/console Version ^8.1
symfony/dependency-injection Version ^8.1
symfony/dotenv Version ^8.1
symfony/filesystem Version ^8.1
symfony/http-client Version ^8.1
symfony/http-kernel Version ^8.1
zenstruck/bytes Version ^1.1