# Thread: Calculating milage between points (Any)

1. ## Calculating milage between points (Any)

Got a client who has customers across the country. He wants to be able to list customers who are, for example, within 50 miles of Tampa, FL, etc.

Anyone know how this type of thing is done?

2. ## Re: Calculating milage between points (Any)

50 miles as the crow flies, or along the road?

3. ## Re: Calculating milage between points (Any)

I use Microsoft MapPoint to do this, displaying it graphically. I only have experience of Microsoft MapPoint Europe, but it does have both Drivetime Zones and Radiuses within it - so it achieves the required results for me.
AFD Postcode in the UK offers a nearest that works on linear distances - I sometimes use that or get the Grid References for the Postcode for each of the possibilities and work out the linear distances based on that. The latter doesn't work so well, though, because it doesn't take into account Estuaries or Mountains - which is not so good (but MapPoint does help with this). My geography is not good enough to know if there are many mountains in Florida though - sorry!

Hope this helps a bit.

4. ## Re: Calculating milage between points (Any)

>>50 miles as the crow flies, or along the road?<<

I don't think it really matters, but I'd say in this situation it was "as the crow flies", which should be the simplest.

5. ## Re: Calculating milage between points (Any)

But how do you get the Grid References, and how do you calculate distances from that? Oh, and Florida has no mountains! <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15> I think the highest point in the state is a slag heap as a result of phosphate mining.

6. ## Re: Calculating milage between points (Any)

(Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

The Longitude and Latitude come from the Address product (in our case, we use AFD Postcode, but that only works in the UK and Ireland). There is a product from AFD called ZipAddress (http://www.afd.co.uk/zipaddress.asp?sec=data) but it doesn't look as though that returns the Longitude and Latitude of a Zip Code - but perhaps someone in the US knows of a similar product that does?

I use AFD Postcode's Common User Interface to submit our equivalent of a ZIP Code, which in turn returns the Long and Lat. This is then saved within a Long and Lat field in my database. Then, I calculate the distance from one Postcode (Zip Code) to the other(s) by using the method described (better than I could re-describe it) here:
http://www.meridianworlddata.com/Dis...alculation.asp

Just having a quick cast around on the Internet, perhaps you could use one of the products shown here? http://www.zipcodeworld.com/developers.htm
(I've never used them, but I see that the Premium version can provide them).

Hope this helps - and thanks for the tip on the geography of Florida - I'll know the answer if it comes up in a Pub Quiz! <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

7. ## Re: Calculating milage between points (Any)

I think tdakc's last link has what you need - a downloadable file (not free, however) with coordinates (longitude and latitude) for zip codes. You'd have to program the distance calculation only once - the same site has code samples (free).

8. ## Re: Calculating milage between points (Any)

I'm checking-out the Meridian World Data site. It looks like they might have more of what I need, as they also have a Cities database which might be more useful in the particular situation I have.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•