From abe3c98bcdc126b6bea7ce9c83e15e13414f836e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 11 Jan 2012 14:01:58 -0500 Subject: [PATCH] Add geopy post. --- posts/geopy.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 posts/geopy.mdwn diff --git a/posts/geopy.mdwn b/posts/geopy.mdwn new file mode 100644 index 0000000..d6c283b --- /dev/null +++ b/posts/geopy.mdwn @@ -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]] -- 2.26.2