Radius Search

M

momo

Can anyone help me? I am writing an ASP.NET app. and I need to be able to
have people search based on X radius of a zip code. Please help.

Thanks,

Momo
 
G

George Durzi

Crap! I did this a few years ago but don't have the code anymore ... But
here's the idea, you're gonna have to hunt down and find the stuff though.

I got a hold of a database of every US zip code geocoded. So every zip code
had a Lat and a Long.

There's a simple formula to measure the distance (as the crow flies) between
two co-ordinates on the earth. The original formula is complex because it
takes into account the curvature of the earth, but in it's simplified form,
it gives good results with a very acceptable (small) margin of error.

Let's use the example of car dealerships, you have a table of them, with a
zip code for each.

Since you have your search zip code, you can lookup its Lat and Long, and
perform a search of all "car dealerships" within x miles of your search zip
code.

Having the formula and the zip code geocode table makes this a piece of
cake. sorry I can't find them :(
 
G

George Durzi

http://www.dbforums.com/archives/t284762.html

George Durzi said:
Crap! I did this a few years ago but don't have the code anymore ... But
here's the idea, you're gonna have to hunt down and find the stuff though.

I got a hold of a database of every US zip code geocoded. So every zip code
had a Lat and a Long.

There's a simple formula to measure the distance (as the crow flies) between
two co-ordinates on the earth. The original formula is complex because it
takes into account the curvature of the earth, but in it's simplified form,
it gives good results with a very acceptable (small) margin of error.

Let's use the example of car dealerships, you have a table of them, with a
zip code for each.

Since you have your search zip code, you can lookup its Lat and Long, and
perform a search of all "car dealerships" within x miles of your search zip
code.

Having the formula and the zip code geocode table makes this a piece of
cake. sorry I can't find them :(
 
M

momo

Thank George this will help.

Momo


George Durzi said:
Crap! I did this a few years ago but don't have the code anymore ... But
here's the idea, you're gonna have to hunt down and find the stuff though.

I got a hold of a database of every US zip code geocoded. So every zip code
had a Lat and a Long.

There's a simple formula to measure the distance (as the crow flies) between
two co-ordinates on the earth. The original formula is complex because it
takes into account the curvature of the earth, but in it's simplified form,
it gives good results with a very acceptable (small) margin of error.

Let's use the example of car dealerships, you have a table of them, with a
zip code for each.

Since you have your search zip code, you can lookup its Lat and Long, and
perform a search of all "car dealerships" within x miles of your search zip
code.

Having the formula and the zip code geocode table makes this a piece of
cake. sorry I can't find them :(
 
J

JL

momo said:
Can anyone help me? I am writing an ASP.NET app. and I need to be able to
have people search based on X radius of a zip code. Please help.

Thanks,

Momo

KJL Software has a free Distance DLL on the freeware page
(www.kjlsoftware.com/freeware.html). You pass a from lat/lon and a to
lat/lon and it returns the distance

HTH

JL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top