[postgis-devel] BOX3D strange behaviour

Sandro Santilli strk at keybit.net
Thu Feb 18 01:49:52 PST 2016


On Thu, Feb 18, 2016 at 10:03:54AM +0100, RĂ©mi Cura wrote:

> Is there any way to perform &&& in all 3 dimensions?

Our boxes are all broken.
There should be somewhere a wiki page or ticker or something about
options to improve the situation. IIRC it boiled down to:

 1) Have a BOX geometry type (like LINESTRING/POINT/POLYGON)
 2) Expose a GBOX postgresql type (like BOX2D, BOX3D)

Recently, I've started using 2-vertices linestrings to simulate
the equivalent of a "BOX geometry type". It is the value returned
by http://postgis.net/docs/ST_BoundingDiagonal.html

You can easily create such object via ST_MakeLine:
http://postgis.net/docs/ST_MakeLine.html

It will support SRID and all supported dimensions.

Changing the BOX3D->Geometry cast ? I'm all for it, and I'd have
it return a "bounding diagonal" too...

--strk;



More information about the postgis-devel mailing list