User:
Pass:
Remember me

Geocoding: found a great article
php | architect has a lot of great stuff. I've been subscribing to their magazine for a little over a year now.

In vol 5 - issue 10, there's an article called "Geocoding: Finding you way" by Chris Cornutt. The article describes a few types of applications where geocoding would be necessary, and then goes on to describe how to use google and yahoo maps api's to get the latitude and longitude of a couple addresses and draw a map connecting the 2.

This is pretty cool, but I was more interested in a proximity search from a given address or zip code. i.e. find all records withing 50 miles of lat/long A little bit of searching led me right back to php | architect who posts this Sample article by Dr. Tarique Sani called "Doing Distance Calculations in PHP" .

He goes into great detail on the subject describing the great circle distance formula, and all that good stuff.

Now, all we need is a real zip code database to start playing around with it. The sample database that comes with Dr. Sani's code examples is incomplete and lists all the same latitude and longitude values.

A lot more searching and I found a free csv file (there are many commercial databases out there, but the licenses are incredibly expensive to use on a webserver). Luckily, CFdynamics.com compiled this database below and offers it free.

http://www.cfdynamics.com/zipbase/

Geocoding, here I come ;)
12.09.2006 12:12 am
No Comments
Post Comment

© 2006 Matt Linardy
top