Search Postgresql Archives

Re: Finding points within 50 miles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jun 27, 2005, at 3:47 AM, Janning Vygen wrote:

I had some problems with the calculation inside acos() sometimes being greater
than 1, which should not occur. Please use a
   CASE WHEN sin(...) > 1 THEN 1 ELSE sin(...) END
if you have the same problem.


We've seen this as well with the distance radius calculation. It doesn't happen in 8.x but did happen 7.4, and then was easily worked around by reducing the precision of the arguments. Ie, we would use 73.13 rather than 73.1343593421 as pulled from the database for the lat/lon values of the center point.

In any case, I urge you to derive the formulas yourself from basic research so you *know* you're getting what you think you're getting.

Vivek Khera, Ph.D.
+1-301-869-4449 x806


Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux