| Author |
Distance Between Postal Codes
|
|
| Dave \IT\ 2005-06-29, 11:23 am |
| I'm looking to find out how I'd go about setting up a database where a
visitor to my site could punch in their postal code, and find out how far
they are from another postal code. For example, AutoTrader has this feature
I believe to tell you how far the vehicle is from you. Dating sites have
them so you can do proximity searches.
Anyone have any ideas where I could start? I'm thinking the post office,
but if anyone else has suggestions, I'm open to hear them.
Thanks!
| |
|
|
|
|
| Dave \IT\ 2005-06-29, 1:24 pm |
| Actually, no, I'm in North America (Canada). Sorry for not mentioning that.
"David Portas" < REMOVE_BEFORE_REPLYI
NG_dportas@acm.org> wrote in message
news:1120060282.670987.93490@g14g2000cwa.googlegroups.com...
> Are you in the UK? Royal Mail has some address database products that
> may meet your requirements:
>
> http://www.royalmail.com/portal/rm/...40085&gear=shop
>
> Other solutions exist too:
> http://www.google.co.uk/search?biw=... />
7CcountryGB
>
> --
> David Portas
> SQL Server MVP
> --
>
| |
|
| Be aware of the limitations of these calculations. I have done something
similar with US zipcodes, same principle. Each zone has a latitude and
longitude associated with it. This point is known as a centroid which is a
representative point for the whole zone. If the zone is a square or a circle
the centroid would be right in the middle. For a very irregular zone the
centroid might not even be in the zone. Think of a doughnut shaped zone.
Then you calculate the distance between the 2 centroids. Imagine 2 100 mile
square zones side by side. The distance calculation would be 100 miles. The
2 interested parties could actually be across the street from each other
each in their own zone.
|
|
|
|