Forum Moderators: phranque

Message Too Old, No Replies

"Find within X km"

Finding nearby locations from postal/zip colde

         

moltar

1:57 pm on Jul 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was wondering how to find locations withing certain radius from specified location? Location is specified by postal code (Canada) and zip code (USA). For example the way it's done on [edit] this site.

[edited by: rcjordan at 7:13 pm (utc) on July 25, 2003]
[edit reason] sorry, no specific sites as examples, please. [/edit]

choster

2:33 pm on Jul 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can go will a location services provider, like services offered by Vicinity or Mapquest (owned by Microsoft and AOL-TW respectively).

Most business I think purchase software and geographic databases to plug into their own system, and a web search for "store locator software" brings up many results.

Try to test them out before you purchase. Some packages, for example, handle state boundaries poorly. This is a constant frustration for me, living in the Washington DC area-- sometimes I'll be told to go to Baltimore if I start from a Maryland address, even though there's a much closer location in the District of Columbia, and similarly people in the suburban sections of DC may be told to go downtown instead of the directly adjacent suburban Maryland or closeby Virginia.

moltar

3:20 pm on Jul 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you choster. I had no idea how it was even called to start with :)

I found few different ones. Can you or someone else give me an advise? Have anyone used any?

Basically all I need is a list of cities, provinces (states), postal (zip) codes and be able to count distance between 2 points.

Thank you!

choster

6:24 pm on Jul 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry, I don't have any firsthand experience.

For the most part they work similarly, against databases of latitude and longtitude measurements. The user enters a postal code, which is correlated to a set of geographic coordinates. That is compared against your list of locations which are also correlated to coordinates. Some simple geometric calculaions later, you have the set of locations whose straight-line distance falls within the right radius. You might even be able to buy the geographic database and write your own software to do the lookups.

rcjordan

6:41 pm on Jul 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a fair amount of experience. Choster is right, most are based on the long-lat calculation and the primary problems are that they are A) poorly done databases full of inaccurate data and/or B) cannot account for geographic impediments (lakes, mountains, etc) in their straight-line calculation.

moltar

6:57 pm on Jul 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The data does not need to be extremely accurate. This is not vital in this case.

Can you advise some good and cheap solutions?

stlouislouis

6:59 pm on Jul 25, 2003 (gmt 0)

10+ Year Member



Hi,

Interesting topic (i.e. how they calc the distance).

I've noticed that when I use Mapquest dot com to find the distance between two places (say for a day trip), it gives me the option to list the driving directions. These driving directions say "go x.x miles, turn right at xxxx street, go x.x miles, merge onto Interstate X at exit 99", etc.

The distances are quite accurate from my spot checks.

So I'm thinking they must be using a fairly detailed and accurate database. I recall from way back before the internet got popular that AAA would make up "trip tik" booklets for your upcoming vacation trips for the asking.

I wonder if they get/got the detailed info from some governmental source, since one would think there would be an "inventory" of specific data, including distance figures, for US roadways. And, if it's governmental in nature, wouldn't it be available free to copy and use?

Take care,

Louis

rcjordan

7:11 pm on Jul 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>Mapquest

Not the same thing. That's GIS data, I think.

>recommend

I don't have a preference, they're all about the same (and WebmasterWorld tries to stay away from naming commercial programs whenever possible) --except for the price.

moltar

7:23 pm on Jul 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Mapquest tends to be very accurate for big, popular cities. If you try to go out of the city and find a small road somewhere in the village, it might give you wrong roads. It had happened to me a few times. It will show all highways and big roads fine, but the small ones are not always accurate.

Again, I don't need that much precision. It's ok if it will go off even by 10km. Not a big deal for my site.

rcjordan: can you sticky me some examples please.