2017 © Pedro Peláez
 

symfony-bundle geoname-bundle

Symfony GeoNameBundle

image

bordeux/geoname-bundle

Symfony GeoNameBundle

  • Monday, April 23, 2018
  • by bordeux
  • Repository
  • 3 Watchers
  • 7 Stars
  • 1,740 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 6 Versions
  • 32 % Grown

The README.md

Geonames Bundle

Build Status Latest Stable Version, (*1)

Introduction

Provides access to the data exported by GeoNames.org into [Symfony 5, 6][2] applications. Starting version 3.0 this library supporting only PostgreSQL database., (*2)

What is geonames.org

From the geonames.org website:, (*3)

The GeoNames geographical database covers all countries and contains over eight million place names that are available for download free of charge., (*4)

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., (*5)

Features

  • Imports the following geonames.org data:, (*6)

    • Countries
    • Timezones
    • States & Provinces
    • Cities, Towns, Suburbs, Villages etc.
  • Provides the following data store implementations:, (*7)

    • Doctrine ORM

Installation

  1. Install the bundle using composer:, (*8)

    composer require bordeux/geoname-bundle
    
  2. Add the bundle to your AppKernel.php, (*9)

    ```php // AppKernel::registerBundles() $bundles = array( // ... new Bordeux\Bundle\GeoNameBundle\BordeuxGeoNameBundle(), // ... );, (*10)

Install or update database schema

Execute the migrations using the supplied migration configuration, (*11)

    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., (*12)

The following commands can be used in sequence to load all supported data from the geonames.org export (https://download.geonames.org/export/dump), (*13)

Import data

Loads a list of all data from geonames.org, (*14)

    php bin/console bordeux:geoname:import  --env=prod

How to run tests?

Just run: docker-compose -f docker-compose.tests.yml up, (*15)

The Versions