Forum Moderators: coopster

Message Too Old, No Replies

Calculating distance with zipcodes

         

smatts9

8:04 pm on Jul 18, 2006 (gmt 0)

10+ Year Member



I have a DB of zipcdoes that includes it's lat. and long. and some other stuff. Is there an easy way of searching "within a 100 miles" etc of someone's location?

eeek

8:37 pm on Jul 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Look at the zipdist project on sourceforge.

madpenguin2

5:10 am on Jul 29, 2006 (gmt 0)

10+ Year Member



that's assumming you're using a postgress db. you could use the 'great circle' to calculate distance. You should be able to calculate a range of lat and long from it. then look up the zips that fall into the range...

eeek

5:50 pm on Jul 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The basic idea is in the postgres functions. Just do the same math in something else if you want.