Subject:   	Python Code to Access geocoder.ca
From:   	"Keith Medcalf" <kmedcalf@dessus.com>
Date:   	Sat, September 2, 2006 1:57 pm
To:   	"GeoCoder.CA (geodata@geocoder.ca)" <geodata@geocoder.ca>
Priority:   	Normal
Options:   	View Full Header |  View Printable Version

Since you don't have it on your site, here is a Python class which will
process geocoder transactions.  Note that it can do *both* free and
commercial service depending on if you initialize the object with an AUTH
code or not.

This is incomplete since it does not handle UTF-8 conversions and a few
other things (and you have to know what you want to do).

I'll send you the completed module when it is fully debugged and documented
(and see if I can get it included with the standard Python distribution as
well, unless you object to that).

You interface is very nice.  I have been trying to find something like this
for a little while ...

(This is also dependant on some Python datum conversion code, also attached,
that was not written by me)
..........................
geocoder.py 	-- implements geocode class
geocode.py 		-- simple wrapper to excersize (or use from
command line)

Handles locale / codepage conversion between UTF-8 and the user/program
codepage automatically
Handles datum conversion between NAD83 and the user/program datum
automatically


These are stolen from some pygarmin code -- comments and notices in the
files are intact:

datum.py		-- datum conversion functions
refdatum.py		-- reference datums


Works with both Python 2.4 and Python 2.5 ...



