posts:geopy: Update URL now that GeoPy has moved to GitHub
[blog.git] / posts / geopy.mdwn
1 [Geopy][] is a [[Python]] package providing a simple interface to
2 convert place names to coordinates and perform basic ellipsoidal
3 geometry.  Here's an excerpt from the [tutorial][]:
4
5 >>> from geopy import geocoders, distance
6 >>> g = geocoders.Google()
7 >>> ny,(ny_lat,ny_lng) = g.geocode('New York, NY')  
8 >>> nas,(nas_lat,nas_lng) = g.geocode('Nassau, Bahamas')  
9 >>> distance.distance((ny_lat, ny_lng), (nas_lat, nas_lng)).nautical
10 952.2940284055431
11
12 [Geopy]: https://github.com/geopy/geopy
13 [tutorial]: http://code.google.com/p/geopy/wiki/GettingStarted
14
15 [[!tag tags/python]]
16 [[!tag tags/tools]]