Aaaaagh! What am I searching for?!!!!!

M

mrcakey

In eBay and quite a lot of sites actually there is a function that does
this:

You enter your postcode/zip code and then you can return results within
5/10/20/200 miles of that address.

I'm going scatty trying to think what it might be called, let alone where I
might buy such a thing.

Any help greatly appreciated.

+mrcakey
 
E

Els

mrcakey said:
You enter your postcode/zip code and then you can return results within
5/10/20/200 miles of that address.

I'm going scatty trying to think what it might be called, let alone where I
might buy such a thing.

One of the components of the cms I use calls it 'radius distance
search'.
 
M

mrcakey

Els said:
One of the components of the cms I use calls it 'radius distance
search'.

Thanks. Radius search has got it. I just thought there might be a
generally accepted term for such things.

+mrcakey
 
M

mrcakey

Sherman Pendley said:
Geocoding. In a nutshell, there are publicly-available databases that map
address data to lat/long coordinates.

<http://en.wikipedia.org/wiki/Geocoding>

So you look up and store the coordinates for each address in your database
as they're added, and you look up the coordinates for the query address
when it comes in.

Now, you *could* run a query to find the database records within a certain
radius. You could, but that would mean finding the distance from every
record
to the query point. That's an awful lot of square roots! :-(

What I do instead is calculate a box: Four lat/long coordinates that
describe
a box that's X miles across, centered on the query point. That's a bit
over-
inclusive, as the corners are technically a little farther away than X
miles
from the center. But it's a much, much faster query, just checking to see
if
the lat/long of each record is within the range of the box.

sherm--

That's a great idea. I'll speak to the client and see if he's happy with
that.

+mrcakey
 
A

Andy Dingley

Geocoding. In a nutshell, there are publicly-available databases that map
address data to lat/long coordinates.

Geocoding is usually regarded as the opposite of what's needed here.
It's taking known things and describing their known location. What the
OP needs is taking some identifier (best is a geographical identifier,
such as postal code), then selecting other items owing to their own
location.

Round here that's normally called "geolocation", but "radius search"
finds it (along with a bunch of other stuff).
 

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

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,900
Latest member
Nell636132

Latest Threads

Top