[postgis-devel] Float vs Double Box

Paul Ramsey pramsey at opengeo.org
Wed Nov 9 09:43:14 PST 2011


So, we've had this argument before, and Mark wanted double boxes for
simplicity, and I wanted float boxes to keep index sizes down.

And I realized on the way into work that actually we could have both,
in that we could serialized double boxes into the geometry objects,
but build the index out of float boxes, since the *key* used by the
index is actually a different structure from the geometries
themselves.

My objection to doubles in the serialization was more concerned with
index size than object size, since for small objects (points,
two-vertex lines) we can just omit the boxes entirely. My objection to
doubles for the index stands, 50% smaller is a big win for an index,
but we can actually have float based indexes and double based
serialization.

Anyhow, that's the good news.

The bad news it it's another dump/restore change that touches quite a
pile of critical code, and we're supposed to be feature freezing in a
couple weeks.

P.



More information about the postgis-devel mailing list