This repository has been archived by the owner on Jun 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Data sources
alexprengere edited this page Mar 9, 2013
·
2 revisions
From the Python API, you may load any data source embedded in the project:
>>> from GeoBases import GeoBase
>>> geo_o = GeoBase(data='ori_por', verbose=False)
From the command line:
$ GeoBase --base ori_por # the data source
You can provide other values for the data parameter. All data sources are documented in a single YAML file:
- data="ori_por" will load a local version of this file, this is the most complete source for airports, use it!
- data="airports" will use geonames as data source for airports
- data="stations" will use RFF data, from the open data website, as data source for french train stations
- data="stations_nls" will use NLS nomenclature as data source for french train stations
- data="stations_uic" will use UIC nomenclature as data source for french train stations
- data="countries" will load data on countries
- data="capitals" will load data on countries capitals
- data="continents" will load data on continents
- data="timezones" will load data on timezones
- data="languages" will load data on languages
- data="cities" will load data on cities, extracted from geonames
- data="currencies" will load data on currencies, extracted from wikipedia
- data="airlines" will load data on airlines, extracted from that file
- data="cabins" will load data on cabins
- data="locales" will load data on locales
- data="location_types" will load data on location types
- data="feature_classes" will load data on feature classes
- data="feature_codes" will load data on feature codes
- data="ori_por_non_iata" will load some non-iata data excluded from ori_por
- data="geonames_MC" will load MC data of geonames
- data="geonames_FR" will load FR data of geonames
- data="postal_codes_MC" will load MC postal codes data
- data="postal_codes_FR" will load FR postal codes data
- data="feed" will create an empty instance
All features are unaware of the underlying data, and are available as long as
the headers are properly set in the configuration file, or from the Python API.
For geographical features, you have to name the latitude field lat
, and the
longitude field lng
.