ride/app-orm-geo

Geo location model for the Ride ORM.

1.0.0 2016-10-14 10:06 UTC

This package is auto-updated.

Last update: 2024-11-13 00:21:06 UTC


README

This module adds a geo location model to the ORM. This model can be used to store geographic locations like continents, countries, regions, cities, ...

Import your data

By default all continents and countries are provided as the regions of some countries. To add the cities, download your country archive from http://download.geonames.org/export/zip. Extract the the country text file from the archive to data/geo/geonames in your application directory (or in a module).

You can now call ride\service\GeoImportService->import() to import the continents and countries. To import the cities, call ride\service\GeoImportService->importCities('country-code'). This can take some time depending on the size of the country.

Related Modules

Installation

You can use Composer to install this application.

composer require ride/app-orm-geo