Top

geodata module

Sub-modules

geodata.AlternateNames

Add alternate names for places using the Geonames.org Alternate names file

geodata.ArgumentParserNoExit

Command argument parser that throws exception rather than exitting

geodata.CachedDictionary

Maintain a cache of a dictionary using Python Pickle files

geodata.Country

Provide a dictionary of all country names and ISO-2 codes

geodata.DB

Provide SQLite database helper functions - insert, select, create tables and indices, etc

geodata.Example

Example program for Geodata gazeteer.

geodata.FileReader

Read a file and call a handler for each line. Update progress bar if present.

geodata.GeoDB

geoname database support routines. Add locations to geoname DB, create geoname tables and indices.
Provides a number of methods to lookup locations by name, feature, admin ID, etc.

geodata.GeoUtil

Utilities

geodata.Geodata

Provides a place lookup gazeteer based on files from geonames.org.
Provides the location lookup methods for the geodata package.

  • Creates a local sqlite3 place database of geonames.org data
  • Parses lookup text and returns multiple matches ranked by closeness to lookup term
    +...

geodata.GeodataBuild

Build database for geonames.org data

geodata.Loc

Holds the details about a Location: Name,state/province, etc as well as the lookup results

geodata.MatchScore

Calculate a heuristic score for how well a result place name matches a target place name.

geodata.Normalize

Provide functions to normalize text strings by converting to lowercase, removing noisewords.
This is used by the lookup functions and the database build functions and match scoring
noise_words is a list of replacements only used for match scoring
phrase_cleanup is a list of replacements for...

geodata.Optimize

Example program for Geodata gazeteer.

geodata.QueryList

Build database queries for various lookups