Re: Postal code radius searches - Mailing list pgsql-general

From Josh Rovero
Subject Re: Postal code radius searches
Date
Msg-id 3C6CDF55.6070201@sonalysts.com
Whole thread Raw
In response to Postal code radius searches  (Milo Hyson <milo@cyberlifelabs.com>)
List pgsql-general
Please note my caveats.  If delta-latitude and delta-longitude
(i.e, a "box" around the center lat-long rather than a circle
of specific radius) is *acceptable for your applications*,
the math can be much simpler.  Think of the lat/long grids
plotted on many maps -- they are "boxes" of delta-lat delta-lon.

There are many applications for which "coloring" or counting
what's in the squares is sufficient.  And once the difference
in lat/long is determined by simple math, you can use the
more costly trig to get more accurate distances.

I did some air traffic density analyses (with postgresql) using
lat/long cells and calculated radius about center points.  The
former is much faster than the latter.

will trillich wrote:

>isn't it a bit more complicated than that?
>
>for example, chicago is where you'll find 60606 but gary
>indiana, barely 30 miles away, is 46407. zipcodes are
>one-dimensional (00000 to 99999) but the geography is
>two-dimensional (north/south, east/west on a mercator-projection
>map) or three-dimensional (latitude, longitude[, radius] on the
>surface of an oblate spheroid).
>


pgsql-general by date:

Previous
From: Carl van Tast
Date:
Subject: Re: Using variables from c to be passed into PQexec
Next
From: Leif Jensen
Date:
Subject: psql & HTML