From: | Josh Rovero <rovero(at)sonalysts(dot)com> |
---|---|
To: | will trillich <will(at)serensoft(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Postal code radius searches |
Date: | 2002-02-15 10:13:41 |
Message-ID: | 3C6CDF55.6070201@sonalysts.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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).
>
From | Date | Subject | |
---|---|---|---|
Next Message | Chris | 2002-02-15 10:56:08 | Re: Perl or PHP DB Access? |
Previous Message | Carl van Tast | 2002-02-15 08:57:35 | Re: Using variables from c to be passed into PQexec |