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

jhmaddox/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! BOSS Geo PlaceFinder (requires a consumer key and secret):

>>> from geopy import geocoders
>>> y = geocoders.YahooPlaceFinder('YOUR_CONSUMER_KEY', 'YOUR_CONSUMER_SECRET')
>>> place, (lat, lng) = y.geocode_one("Thames Street, Newport, RI")
>>> print "%s: %.5f, %.5f" % (place, lat, lng)
Thames St, Newport, RI 02840, United States: 41.48327, -71.31461

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%