[postgis-devel] Vive Doublebox

Paul Ramsey pramsey at opengeo.org
Wed Dec 7 10:05:04 PST 2011


On Wed, Dec 7, 2011 at 9:29 AM, Sandro Santilli <strk at keybit.net> wrote:
> On Wed, Dec 07, 2011 at 08:32:48AM -0800, Paul Ramsey wrote:
>
>> 'LINESTRING(0 0, 1 1)'::geometry::bbox will be 'BOX(-0.00000001
>> -0.00000001, 1.00000001 1.000000001)'
>
> Floats have at most 7 significant digits. Your numbers above would
> be 0 and 1 if the printing didn't print 9 instead.

Right, I should have noted that this was an illustrative example only,
not an exact one.

>> I'm tempted to apply the doublebox to trunk, and just commit to trying
>> to make it faster over time.
>
> Would indices be also part of this conversion-to-double ? Implications ?

No, they would still be float, and the implications are limited.
They'd remain the same size, the && operator would still only work on
float boxes so it would be slightly more inclusive than if it was full
double, and it would be possible to get "funny" results like "hey, my
geometries are separated by <this very small distance> but && still
returns true!". But that's not new behavior, just continuation of
current behavior. In general our behavior would become more
consistent.

P.



>
> --strk;
>
>  ,------o-.
>  |   __/  |    Thank you for PostGIS-2.0 Topology !
>  |  / 2.0 |    http://www.pledgebank.com/postgistopology
>  `-o------'
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list