Skip to content
/ geopy Public
forked from geopy/geopy

A Geocoding Toolbox for Python. Official git repo.

License

Notifications You must be signed in to change notification settings

rnagle/geopy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geopy

© GeoPy Project and individual contributors, MIT License

geopy is a Python client for several popular geocoding web services.

geopy makes it easy for Python developers to locate the coordinates of addresses, cities, countries, and landmarks across the globe using third-party geocoders and other data sources.

geopy includes geocoder classes for the Google Geocoding API (V3), the Yahoo! geocoder, geocoder.us, Bing Maps API, and several more Geocoder API services. The various geocoder classes are located in geopy.geocoders.

Notes

Installation

Using pip:

pip install geopy

Or, manually: Download the tarball from PyPI, unzip, and execute this in the same directory:

python setup.py install

Basic Geocoding

Examples

Using the GoogleV3 geocoder:

>>> from geopy import geocoders
>>> g = geocoders.GoogleV3()
>>> place, (lat, lng) = g.geocode("10900 Euclid Ave in Cleveland")
>>> print "%s: %.5f, %.5f" % (place, lat, lng)
10900 Euclid Ave, Cleveland, OH 44106, USA: 41.50489, -81.61027

Using the Yahoo! geocoder (requires an Application ID):

>>> from geopy import geocoders
>>> y = geocoders.Yahoo('YOUR_APP_ID_HERE')
>>> place, (lat, lng) = y.geocode("Thames Street, Newport, RI")
>>> print "%s: %.5f, %.5f" % (place, lat, lng)
[241-251] THAMES ST, NEWPORT, RI 02840, US: 41.48696, -71.31490

More documentation and examples can be found on the old Google Code documentation site.

About

A Geocoding Toolbox for Python. Official git repo.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%