Add geopy post.
authorW. Trevor King <wking@drexel.edu>
Wed, 11 Jan 2012 19:01:58 +0000 (14:01 -0500)
committerW. Trevor King <wking@drexel.edu>
Wed, 11 Jan 2012 19:01:58 +0000 (14:01 -0500)
posts/geopy.mdwn [new file with mode: 0644]

diff --git a/posts/geopy.mdwn b/posts/geopy.mdwn
new file mode 100644 (file)
index 0000000..d6c283b
--- /dev/null
@@ -0,0 +1,16 @@
+[Geopy][] is a [[Python]] package providing a simple interface to
+convert place names to coordinates and perform basic ellipsoidal
+geometry.  Here's an excerpt from the [tutorial][]:
+
+>>> from geopy import geocoders, distance
+>>> g = geocoders.Google()
+>>> ny,(ny_lat,ny_lng) = g.geocode('New York, NY')  
+>>> nas,(nas_lat,nas_lng) = g.geocode('Nassau, Bahamas')  
+>>> distance.distance((ny_lat, ny_lng), (nas_lat, nas_lng)).nautical
+952.2940284055431
+
+[Geopy]: http://www.geopy.org/
+[tutorial]: http://code.google.com/p/geopy/wiki/GettingStarted
+
+[[!tag tags/python]]
+[[!tag tags/tools]]