bordeux / geoname-bundle
Symfony GeoNameBundle
Installs: 9 378
Dependents: 0
Suggesters: 0
Security: 0
Stars: 16
Watchers: 5
Forks: 15
Open Issues: 4
Type:symfony-bundle
Requires
- php: >=8.0
- ext-zip: *
- doctrine/annotations: ^1.0
- doctrine/doctrine-bundle: ^2.0
- guzzlehttp/guzzle: ^6.0 || ^7.0
- symfony/console: ^5.4 || ^6.0
Requires (Dev)
- doctrine/orm: ^2.5
- ergebnis/composer-normalize: ^2.26
- orklah/psalm-insane-comparison: ^2.0
- php-standard-library/psalm-plugin: ^1.1
- phpunit/phpunit: ^9.5.20
- psalm/plugin-symfony: ^4.0 || ^5.0
- roave/security-advisories: dev-latest
- symfony/framework-bundle: ^5.4 || ^6.4
- symfony/yaml: ^5.4 || ^6.4
- weirdan/doctrine-psalm-plugin: ^2.3
This package is auto-updated.
Last update: 2024-11-05 14:09:51 UTC
README
Introduction
Provides access to the data exported by GeoNames.org into Symfony 5, 6 applications. Starting version 3.0 this library supporting only PostgreSQL database.
What is geonames.org
From the geonames.org website:
The GeoNames geographical database covers all countries and contains over eight million place names that are available for download free of charge.
When to use this bundle
Most useful application for this bundle is to normalize the geograhical information stored in your database such as Countries, States and Cities. Thanks to the extensive geonames.org data almost all cities, towns and suburbs are covered worldwide.
Features
-
Imports the following geonames.org data:
- Countries
- Timezones
- States & Provinces
- Cities, Towns, Suburbs, Villages etc.
-
Provides the following data store implementations:
- Doctrine ORM
Installation
-
Install the bundle using composer:
composer require bordeux/geoname-bundle
-
Add the bundle to your
AppKernel.php
// AppKernel::registerBundles() $bundles = array( // ... new Bordeux\Bundle\GeoNameBundle\BordeuxGeoNameBundle(), // ... );
Install or update database schema
Execute the migrations using the supplied migration configuration
php bin/console doctrine:schema:update --force
Import the data
Note that importing the data from the remote geonames.org repository involves downloading almost 350 MB data from geonames.org.
The following commands can be used in sequence to load all supported data from the geonames.org export (https://download.geonames.org/export/dump)
Import data
Loads a list of all data from geonames.org
php bin/console bordeux:geoname:import --env=prod
How to run tests?
Just run: docker-compose -f docker-compose.tests.yml up