Finding all the addresses within a radius is going to be near
impossible unless you have a database containing every possible
address (or at least the ones you're interested in finding) along with
their geocodes. Same goes with zip codes. There are several methods
that can be used to determine zip codes within a radius:

1. Using centroid to centroid matching.

Centroid matching takes the center of the zip code and uses the
Haversine (or similar) formula to compute point to point distance.
It's fairly straight forward once you have a database of zip code
centroids. The downside of this method is centroid is often not very
representative of a zip code, unless you're using very large
distances, like 100+ miles.

2. Using edge to edge matching.

This method requires a database of zip code polygons and uses an
algorithm to calculate the edges that are within the radius of the
edge of a particular zip code. While more accurate, this method is
also more complex. Using a spatially enabled database will make this a
snap though.

3. Wholly enclosed polygon matching.

This method also uses a polygon database and requires all candidates
to be wholly contained within the radius. Again, complex but depending
on what you're trying to do, may be the best.

The API itself has no facility to do these type of calculates as there
is no data available to do them. You'll have to supply the data and do
the calculations yourself.

Hope this helps.

-John Coryat

http://maps.huge.info

http://www.usnaviguide.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

  • Google Maps API. Hemant kalal
    • Re: Google Maps API. maps.huge.info [Maps API Guru]

Reply via email to