Skip to main content

Offline reverse geocoder

Project description

Reverse Geocoder takes a latitude / longitude coordinate and returns the nearest town/city. This library improves on existing libraries called reverse_geocode developed by Richard Penman & reverse_geocoder by Ajay Thampi in the following ways:

  • support init non-singleton instance of RGeocoder to support different stream simultaneously (creating RGeocoderImpl class to support that)

  • added the capability change the header columns when loading custom stream and loaded different schemas

  • added query_dist to support returning distance in addtion to the reverse geocoding data itself

  • added do_extract to trigger extraction for any Geonames file, e.g: 1000, 15000 etc

  • removed win32 and python2 support. added utility function to load data from files/buffers

Example usage:
>>> import rvgeocoder as rvg
>>> coordinates = (41.852968, -87.725730), (48.836364, 2.357422)
>>> rvg.search(coordinates)
[OrderedDict([('lat', '41.84559'),
          ('lon', '-87.75394'),
          ('name', 'Cicero'),
          ('admin1', 'Illinois'),
          ('admin2', 'Cook County'),
          ('cc', 'US')]),
 OrderedDict([('lat', '48.85341'),
          ('lon', '2.3488'),
          ('name', 'Paris'),
          ('admin1', 'Ile-de-France'),
          ('admin2', 'Paris'),
          ('cc', 'FR')])]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rvgeocoder-1.0.8.tar.gz (2.2 MB view details)

Uploaded Source

File details

Details for the file rvgeocoder-1.0.8.tar.gz.

File metadata

  • Download URL: rvgeocoder-1.0.8.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for rvgeocoder-1.0.8.tar.gz
Algorithm Hash digest
SHA256 574369cceae395529f82b25638de7cf451a5333a67477dcb1b0548cb4ccdc1f8
MD5 cb71bf268efa2e0da942b5b57dec664c
BLAKE2b-256 3314975e6e36e50c0fcafb034eaf25e6bd0de03f35d0b6c90c70d47aedd329ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page