radius search
- From: Paul Bushnell
- Date: Fri, 09 Oct 2009 09:12:46 -0700
I know all about it, including where to get the tables, etc.
Contact through here or the contact form on my site:
http://repairdot.com
Peter Duniho wrote:
Re: A Radius Search?
13-Jun-09
On Fri, 12 Jun 2009 20:26:01 -0700, jp2msft
<jp2msft@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
It is trivial in the sense that the math is simple. In fact, for your
purposes it's unlikely you need a very accurate great circle calculation.
Even one that assumes the Earth is a perfect sphere is probably good
enough, in spite of the large error that can be present with that approach.
The hard part is your database, which will need to include lat/lon
information for all possible zip codes, as well as for all "available
locations". You may be able to obtain a computer-readable database for
the zip code information from the United States Post Office (assuming
you're looking for US zip codes, of course...most countries use a term
other than "zip code", thus my assumption you're talking about US zip
codes). You could subscribe to/license a map database that includes
support for translating addresses to lat/lon, but assuming you know in
advance the specific "available locations", you may find it more
cost-effective to just make your own database with the lat/lon
precalculated.
I don't know the licensing terms, but it's possible you could use the
Google Maps Javascript API to do the initial lat/lon calculations, to be
stored in your database. Google Maps can convert any US zip code or
address to a specific lat/lon for you. Of course, the specifics of that
are off-topic here. You'll need to research that on your own somewhere
else.
Likewise the great circle calculation. But, I know for a fact that
there's a lot of examples available online for that. Just Google it. :)
Pete
EggHeadCafe - Software Developer Portal of Choice
Asynchronous WebRequest: The Basics
http://www.eggheadcafe.com/tutorials/aspnet/ca3b349e-60bb-4b6c-bddf-86b16f9a00dd/asynchronous-webrequest.aspx
.
- Prev by Date: Virtual Bytes vs Private Bytes
- Next by Date: Re: Constructors and UserControls
- Previous by thread: Virtual Bytes vs Private Bytes
- Next by thread: Re: Multiple events in excel
- Index(es):
Relevant Pages
|