Welcome Guest, Not a member yet? Register   Sign In
Zip Code radius
#1

[eluser]thurting[/eluser]
Hello,

A client is requesting functionality to allow users to filter results based on zip code radius; e.g. find all foos within 25 miles of user's zip. I have never implemented functionality like this and was wondering if anyone here had any pointers or tricks they would like to share.

Thanks.
#2

[eluser]GSV Sleeper Service[/eluser]
I've done something similar for UK postcodes, it involved getting hold of a geocoding database, which contained top level postcodes and their corresponding eastings/northings values. a little bit of trig and you're there.
This was a few years ago, and the database was not cheap, you may be able to find a free one somewhere.
#3

[eluser]obiron2[/eluser]
You may be able to use google maps API to do this.
#4

[eluser]yusufdestina[/eluser]
I did it with gmaps and this article: link
#5

[eluser]muttlogic[/eluser]
More information here: http://ellislab.com/forums/viewthread/78436/

We've recently implemented using this library: http://www.micahcarrick.com/04-19-2005/p...ation.html using a database purchased from http://www.zipcodedownload.com/.

-Jeff
#6

[eluser]thurting[/eluser]
Thanks for the links. Looks simple enough with the proper data set.

muttlogic, the library you linked to contained a db, but you ended up purchasing one elsewhere. Can you please tell me why? Is the data set contained in the example incomplete?

Thanks.
#7

[eluser]muttlogic[/eluser]
thurting,

We assumed that the database was not current and I believe I read so when researching the library. It says it's based on 2000 & 2004 US Census data, which is almost certainly out-of-date if you're looking for complete US Coverage.

-Jeff
#8

[eluser]thurting[/eluser]
Thanks again. I see that the site you pointed to also offers ongoing updates which is nice. The price point is ok, but before I buy, does anyone know of any services similar to zipcodedownload.com?
#9

[eluser]Colin Williams[/eluser]
All you really need is Zip Code (Postal Code) to lat and long. Then you can do a little geometry, trigonometry to work out the bounds of the lat and long for a given radius. You could probably find free databases out there that are reasonably accurate (and if it's for a client, why fret at passing on the price to them... this should have been realized from the start). Scour university sites and forums for free versions.
#10

[eluser]thurting[/eluser]
As I said before, the price point on what was initially suggested is OK, and I'd be willing to pay more if there is a better service. My main concern is finding a reliable data set that will remain reliable over time.




Theme © iAndrew 2016 - Forum software by © MyBB