473,404 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Radius Search

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
Nov 17 '05 #1
5 2572
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 :(

"momo" <se**********@seeourweb.com> wrote in message
news:uU**************@tk2msftngp13.phx.gbl...
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

Nov 17 '05 #2
http://www.dbforums.com/archives/t284762.html

"George Durzi" <gd****@hotmail.com> wrote in message
news:ur*************@TK2MSFTNGP11.phx.gbl...
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 :(

"momo" <se**********@seeourweb.com> wrote in message
news:uU**************@tk2msftngp13.phx.gbl...
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


Nov 17 '05 #3
http://www.zipcodedownload.com/produ...ID=DLLDistance
http://www.zipcodedownload.com/Resou...e.dotnet-c.txt

Hope this helps.
"George Durzi" <gd****@hotmail.com> wrote in message
news:ur*************@TK2MSFTNGP11.phx.gbl...
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 :(

"momo" <se**********@seeourweb.com> wrote in message
news:uU**************@tk2msftngp13.phx.gbl...
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


Nov 17 '05 #4
Thank George this will help.

Momo
"George Durzi" <gd****@hotmail.com> wrote in message
news:ur*************@TK2MSFTNGP11.phx.gbl...
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 :(

"momo" <se**********@seeourweb.com> wrote in message
news:uU**************@tk2msftngp13.phx.gbl...
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


Nov 17 '05 #5
JL
"momo" <se**********@seeourweb.com> wrote in message news:<uU**************@tk2msftngp13.phx.gbl>...
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
Nov 17 '05 #6

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

Similar topics

8
by: Bacci | last post by:
I'm creating a zip code radius search. I have a general understand of how this works, but am puzzled by how to get my final list of company locations. I have setup two database tables: one with...
4
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...
1
by: Stormkid | last post by:
Hi Group, I'm trying to use the longitude and latitude to do a radius search but I'm getting some inaccurate results, below is the code and I was wondering if anyone knows weather or not I'm doing...
2
by: Nazir | last post by:
Hi - I know this isn't really a specific SQL Server question but I can't think of a better forum. I want to implement a more sophisticated UK postcode search on a site - "LIKE 'NW%'" etc, is not...
1
by: Pietro | last post by:
Hi at all, I teach into a teachnical school and many boys must to know best CSS. I have two problems: 1)Making tables we'ld want make the cells with round angles. Therefore we apply ...
1
by: twhan twhan via .NET 247 | last post by:
Hi, currently i am developing a Radius server application. Cananyone show me how can i unpack the "User-Password" attribute sothat i can get back the password in plain text so that i canverify it...
9
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
3
by: dimstthomas | last post by:
Hello Anyone know how to make an svg circle radius fixed (i.e. not affected by transforms)? I tried adding px or cm, e.g. r='15px' but it just generates an error. Thanks
5
by: Widge | last post by:
s there such a plug in or piece of code that can handle the following scenario? 1) I have a list of suppliers, goods they sell and addresses/postcodes 2) Customer comes along, says they need...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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,...

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.