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
Initial published databases:
geo.sqlitecontains countries and statesus.sqlitecontains United States cities
GeoNames provides the canonical ids, so the shared runtime base is geo.sqlite, with country-specific city databases layered on top.
Build-time tooling is separate from the public bundle command.
Admin tools:
admin/download-geonames.phpadmin/build-sqlite.php
Current build sequence:
- Download the GeoNames source files.
- Run
admin/build-sqlite.php. - Parse the downloaded GeoNames files directly and insert them into SQLite with prepared statements.
- Publish the SQLite artifacts to Hugging Face.
The build command currently depends on:
countryInfo.txtadmin1CodesASCII.txtadmin2Codes.txtallCountries.zip
These files carry the GeoNames ids needed to keep countries, administrative areas, and cities on the same authority system.
The published output should include:
- a
README.mddataset card with YAML front matter geo.sqliteus.sqlite
The public bundle command will fetch those published SQLite files rather than rebuilding them locally.
composer req survos/geonames-bundleThe public Symfony command is:
bin/console survos:geoPlanned usage:
bin/console survos:geo
bin/console survos:geo --country=usThe current bundle command is still a stub; the admin commands are the active build path.
The runtime API will stay lookup-oriented.
Example:
$geoId = $this->geoService->find('Oslo');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.