Blog /My Cascading Geocoder

September 24, 2008 16:01 +0000  |  Maps PHP Programming Software 3

I just read a nifty post on monkeycycle about how to geocode an spreadsheet with free tools from Google and Yahoo and it occurred to me that this is probably the kind of thing people go looking for so I thought that I'd post my latest shiny new bit of code here.

I call it a cascading geocoder. The idea being that most of the time, a single geocoding service is pretty good, but sometimes it goes down, and other times it can't understand the address. For the purposes of the project I'm working on, this wasn't permissible, so I wrote some code that attempts to code an address first with Google, then if that fails, it uses geocoder.ca's engine.

It's fully object oriented and very clean. It's also GPL. Download it here if you're interested ^_^

Comments

michael
24 Sep 2008, 4:38 p.m.  | 

Nice one Dan, improvements are always good. I've downloaded and will check it out.

Heads up that, afaik, Google and geocoder return slightly different degrees of accuracy -- probably not an issue for most general cases though.

Hope you're well on the west coast.

Chad
27 Sep 2008, 9:23 p.m.  | 

Thanks Dan, looks good.

You may want to clear the literals "Vancouver, BC" from the google class, as it's currently somewhat handcuffed.

Daniel
28 Sep 2008, 5:12 a.m.  | 

Ooh yeah. Forgot about that one. Worked for my purposes of course since I was only doing Vancouver but yeah, that should probably be removed ;-)

Post a Comment of Your Own

Markdown will work here, if you're into that sort of thing.