[postgis-devel] GBOXF

Sandro Santilli strk at keybit.net
Tue Nov 29 07:10:37 PST 2011


On Tue, Nov 29, 2011 at 02:21:36PM +0000, Mark Cave-Ayland wrote:

> Indeed. My main argument for using doubles instead of floats is
> because at the moment, we inflate the bounding box from double to
> float. This means that we can categorically state that a point
> *outside* of the float bounding box is definitely not within the
> real bounding box of the geometry, but we cannot say the inverse,
> i.e. a point *inside* the float bounding box may or may not within
> the real bounding box of the geometry.

Your use of "real" seems inappropriate to me.
Both boxes are "bounding".
One may be smaller than the other, so could be "closer" to the
real "minimum bounding box".

> My feeling is that if we use floats then we minimise the usefulness
> of the cache because it reduces the number of use cases that it
> could be used to optimise (and I'm fairly sure that some functions
> will assume that the second predicate in the paragraph above is
> true, and therefore give wrong answers in certain cases).

Would be useful to have a few of these use cases listed here.
The only one I can think about would be using && to really check
for equality of points.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-devel mailing list