473,757 Members | 5,404 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Distance Between Postal Codes

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!
Jul 23 '05 #1
4 2738
Are you in the UK? Royal Mail has some address database products that
may meet your requirements:

http://www.royalmail.com/portal/rm/s...0085&gear=shop

Other solutions exist too:
http://www.google.co.uk/search?biw=9...UK%7CcountryGB

--
David Portas
SQL Server MVP
--

Jul 23 '05 #2
This company does mailing list software with that data in it:

http://www.melissadata.com/Lookups/

Jul 23 '05 #3
Actually, no, I'm in North America (Canada). Sorry for not mentioning that.

"David Portas" <RE************ *************** *@acm.org> wrote in message
news:11******** *************@g 14g2000cwa.goog legroups.com...
Are you in the UK? Royal Mail has some address database products that
may meet your requirements:

http://www.royalmail.com/portal/rm/s...0085&gear=shop

Other solutions exist too:
http://www.google.co.uk/search?biw=9...UK%7CcountryGB

--
David Portas
SQL Server MVP
--

Jul 23 '05 #4
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.

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3815
by: Xenophobe | last post by:
I have successfully created a zip code radius search, but the performance is unacceptable. I have two tables. The first is 52K zip codes w/lat and long. The second is 3K national business addresses. Using the zip code 10010, it takes almost 60 seconds to return 122 businesses within a 25 mile radius. This slowdown is almost entirely due to the query radius distance formula.
1
1921
by: Galsaba | last post by:
I am trying to find a software that can find distance between two ZIP codes. I think most of them do it by having the longtitude and latidute of each ZIP, and substract. But this gives the air distance. Where can I find software that find the ground distance (like in Mapquest). Thanks, Joe
2
1768
by: Galsaba | last post by:
anyone knows what the formula is for finding a distance betweeen 2 zip codes? Aaron
7
11025
by: csumner | last post by:
I am trying to use the haversine function to find the distance between two points on a sphere, specifically two zip codes in my database. I'm neither horribly familiar with SQL syntax nor math equations :), so I was hoping I could get some help. Below is what I'm using and it is, as best as I can figure, the correct formula. It is not however, giving me correct results. Some are close, others don't seem right at all. Any ideas? SET...
2
8375
by: Axel Foley | last post by:
I used some of the excellent resources from DITHERING.COM for help in my groveling newbie attempts to cough up working form validation.... I cut and pasted bits of code to check USA ZIP codes and CANADIAN POSTAL codes, and merged them into one function that I called validCode. The <form> tag has an onSubmit call to a general form-checker that works fine to make sure all fields are filled. But within the form is a ZIP/POSTAL CODE field,...
2
2038
by: Bobbie | last post by:
I am trying to make mailing labels. The zip/postal codes are 9 digits (ex: 40601-0223) I ran a query and put in the input mask 00000/-9999;;_ and it works but when I make the mailing labels and it pulls in the data the dash is missing (Ex: 406010223). Does anyone know how I can get the dash to follow to the labels? I tried using the wizard and I also built them manually. Any suggestions would be appreciated. Thank you,
2
2752
by: Surfdog | last post by:
Hello all, I'm unable to figure out how to process the zip codes with regexes. We have a custom component that takes a find pattern, a replace pattern, and the input value, and will output the processed result string. At the moment we're trying to clean up some zip code data that has the following inconsistencies, for example: 99d999 99999d
9
3445
by: Sandy | last post by:
Hello - I need either a cheap tool or code & DB that calculates, eg. within 50-mile radius of a zip code. Anyone have any suggestions? -- Sandy
4
1629
by: Dave | last post by:
Hi I want to add functionality to my site so that customers can type in a postcode and we can tell them the "nearest store" in our database. I have noticed there are loads of sites on the net that offer this service but some of the them are small back bedroom sites. Do they really pay for the expensive postcode data or is there an alternative method you can use with some additional coding??
0
10069
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9904
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9735
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8736
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7285
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3828
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3395
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.