Using Python shell to lookup lat/long of my home address:

>>> import xmlrpclib
>>> server_url = 'http://rpc.geocoder.us/service/xmlrpc'
>>> server = xmlrpclib.Server(server_url)
>>> result = server.geocode("3745 SE Harrison St., Portland, OR 97214")
>>> result
[{'city': 'Portland', 'prefix': 'SE', 'suffix': '', 'zip': 97214, 'number':
3745, 'long': -122.624652, 'state': 'OR', 'street': 'Harrison', 'lat':
45.508740000000003, 'type': 'St'}]

Try it, if you've got a US address you want to check (then maybe enter the
coords in Google Earth to see where that is).

The server is actually written in Perl.

Kirby


_______________________________________________
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to