Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Geonames Bundle

Geonames Bundle Laravel Package

giosh94mhz/geonames-bundle

Symfony bundle that integrates the GeoNames geographical database into your app, providing services and console commands to import and query countries, regions, and cities. Simplifies location lookups and geodata management in PHP projects.

View on GitHub
Deep Wiki
Context7

Symfony2 bundle to import and use Geonames toponyms

Frequently asked questions about Geonames Bundle
Can I use giosh94mhz/geonames-bundle in a Laravel application?
Not as a drop-in Composer dependency. It is a Symfony 2 bundle using AppKernel registration, Symfony dependency injection, Doctrine ORM, and Symfony console commands, while Laravel uses ServiceProvider registration, Eloquent, and Artisan. Treat it as a reference implementation: study the entity mappings and console commands, then reimplement the schema as migrations and the importer as an Artisan command.
Does this package work with Laravel 10 or 11 and modern PHP?
Very unlikely on Laravel 10 or 11. The bundle is Symfony 2-era, with Symfony 2.8 reaching end of life in 2018, so composer require will probably fail on PHP, Symfony, or Doctrine constraints. Assume abandoned transitive dependencies and no supported upgrade path; plan a port or choose another approach.
How do I import GeoNames data into Laravel without this bundle?
Reimplement the importer as an Artisan command and create migrations plus Eloquent models for countries, admin divisions, cities, and timezones. Use the bundle's column names, especially geonameid as the primary key, and copy its one-importer-per-dump-file pattern. Prove it first on a bounded dataset such as cities5000+ or a single country.
What GeoNames datasets does the bundle import?
The bundle supports countries, regions and administrative divisions, cities and toponyms, and timezones from GeoNames dump files. Its design uses one importer per dump file, which maps well to separate Artisan commands. For Laravel, scope the dataset first because full allCountries is millions of rows and operationally heavy, while cities5000+ or a single country is cheaper for autocomplete and lookups.
Is giosh94mhz/geonames-bundle maintained or abandoned?
Treat it as abandoned for practical purposes: it has 6 stars, 0 dependents, and is Symfony 2-era. The MIT license makes forking and porting legally clean, and GeoNames data itself is CC-BY with attribution required in your UI and docs. The lasting value is the data model and importer design, not ongoing maintenance.
Do I need the full GeoNames database or just cities?
Usually a bounded subset is enough. For search, autocomplete, or country-region-city dropdowns, cities5000+ or a single country proves the pipeline cheaply. Full allCountries is millions of rows and changes import time, indexes, storage, and batch sizing.
Can I use an external geocoding API instead of importing GeoNames?
Often yes, and that can correctly cancel the import track. Nominatim, Google, Mapbox, or HERE can satisfy geocoding and lookup requirements at lower operational cost. Self-hosted offline geo data is worth it only if offline access, cost control, rate limits, or privacy are hard requirements.
What is the Doctrine-to-Eloquent translation cost for the entity schema?
The conceptual schema maps cleanly: countries, admin1 and admin2 divisions, cities and toponyms, timezones, coordinates, population, and geonameid keys become Eloquent models and migrations. The real cost is in detail: table naming, relationships, hierarchy traversal, and batch import sizing. Keep the bundle's column names so its example SQL and data mappings still apply.
How should I design the Laravel importer for GeoNames dump files?
Use one Artisan command per dump file with options such as --dataset= and --country=, chunked reads, and queue or batch primitives. Re-validate any inherited Doctrine batch logic against your own schema and indexes. Mirror geonameid as the primary key and import in hierarchy order: country, admin1 and admin2, city, then timezone.
Is there a maintained Laravel-native GeoNames importer?
There is no well-known maintained Laravel-native equivalent implied by this package, so evaluate current Composer options and be ready to own a fork or port. The bundle itself is not Laravel-native and has no dependents. Assign an internal owner for the ported code from day one if you proceed.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect