[Zope] searching by miles from __ zip code----updated to: getting list of zip codes in x miles radius

Dylan Reinhardt zope@dylanreinhardt.com
12 Jun 2003 13:44:33 -0700


On Thu, 2003-06-12 at 12:23, Sean Kelley wrote:
> Thanks for the thought on this.  I realized that what I really need is
> a return of all of the zip codes within x miles of a zip code.  In
> other words, show me all records (from zcatalog or sql) which match
> the results of a radius search where zip codes in the radius are
> returned.

This could be decently approximated by finding all the POs that are
about double the search distance from the target PO.  That should do a
fair job of estimating which neighbor zips your radius would probably
include.  Then use the selected zip codes as a filter for your next
search.

This is, of course, assuming you're not planning on going to the bother
of actually finding with where the *real* zip code borders are.  

Again, this isn't probably the *correct* solution, but it may prove
useful enough for your purposes.

Dylan