Giter Club home page Giter Club logo

nominatim's Introduction

nominatim

OSM Nominatim API module pypi

tested with Python 2.7.6 and Python 3.4.0

Instalation

pip install nominatim

or

git clone https://github.com/damianbraun/nominatim.git
python setup.py install

Quick Start

In [1]: from nominatim import Nominatim, NominatimReverse

In [2]: nom = Nominatim()

In [3]: nom.query('58 Parker Street London')
Out[3]: 
[{u'boundingbox': [u'51.5162200927734',
   u'51.516357421875',
   u'-0.120491504669189',
   u'-0.12029179930687'],
  u'class': u'place',
  u'display_name': u'58, Parker Street, Holborn, St Giles, London Borough of Camden, London, Greater London, England, WC2, United Kingdom',
  u'importance': 0.421,
  u'lat': u'51.5162894',
  u'licence': u'Data \xa9 OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright',
  u'lon': u'-0.120392595530143',
  u'osm_id': u'148391190',
  u'osm_type': u'way',
  u'place_id': u'83887926',
  u'type': u'house'}]

In [4]: nomrev = NominatimReverse()

In [5]: nomrev.query(lat=51.51640, lon=-0.12036)
Out[5]: 
{u'address': {u'city': u'Greater London',
  u'country': u'United Kingdom',
  u'country_code': u'gb',
  u'house': u'Parker Tower',
  u'house_number': u'43-49',
  u'neighbourhood': u'Holborn',
  u'postcode': u'WC2',
  u'road': u'Parker Street',
  u'state': u'England',
  u'suburb': u'St Giles'},
 u'display_name': u'Parker Tower, 43-49, Parker Street, Holborn, St Giles, London Borough of Camden, London, Greater London, England, WC2, United Kingdom',
 u'lat': u'51.5163998',
 u'licence': u'Data \xa9 OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright',
 u'lon': u'-0.120774554750572',
 u'osm_id': u'97237923',
 u'osm_type': u'way',
 u'place_id': u'64398568'}

nominatim's People

Contributors

damianbraun avatar iburadempa avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.