[postgis-devel] Box Plan?

Paul Ramsey pramsey at cleverelephant.ca
Wed Jun 15 14:25:43 PDT 2011


Does anyone have a box plan? Right now we have three user-visible
boxes, and another couple invisible ones:


postgis15=# select 'BOX(0 0,1 1)'::box2d;
    box2d
--------------
 BOX(0 0,1 1)
(1 row)

postgis15=# select 'BOX3D(0 0,1 1)'::box3d;
       box3d
--------------------
 BOX3D(0 0 0,1 1 0)
(1 row)

postgis15=# select '((0,0),(1,1))'::box;
     box
-------------
 (1,1),(0,0)
(1 row)

The invisible ones are box3d_extent and box2df. In PostGIS 1.5 box2d
is actually backed by floats, but in 2.0 it'll be backed by doubles.

The cleanest plan I've seen so far is to dispense with user box types
altogether and embed a BOX specialization into GEOMETRY. However. I
haven't thought that all the way through.

Inertia being what it is, we're mostly likely to end up with the same
boxes before as after, in all their legacy-encrusted glory.

If anyone can write up a long-term plan for boxes, I'd love to see it.

P.



More information about the postgis-devel mailing list