[postgis-devel] Vive Doublebox

Paul Ramsey pramsey at cleverelephant.ca
Wed Dec 7 08:32:48 PST 2011


I was all ready to just move ahead and discard doublebox, and then I
realized that the next thing I'm going to move ahead on (bbox type
with SRID support) will be pretty brutally impacted. One of the things
Sandro asked for in the bbox type was that it very quickly cast from
geometry. That implies reading the cached box. That implies that, if
we stay as we are, the result of

'LINESTRING(0 0, 1 1)'::geometry::bbox will be 'BOX(-0.00000001
-0.00000001, 1.00000001 1.000000001)'

This is nothing new, it's what you get if you cast to box2d, but it's
more user visible cruft around having a float cache on a value (the
bounds) that people expect to be exactly matching the coordinates. It
feels a shame to make a shiny brand new type and have it visibly
reflect one of the uglier design compromises of the 1.x series.

I'm tempted to apply the doublebox to trunk, and just commit to trying
to make it faster over time.

P.



More information about the postgis-devel mailing list