MobilityDB 1.1

◆ box3d_to_lwgeom()

LWGEOM * box3d_to_lwgeom ( BOX3D box)

Create a geometry from a BOX3D.

Note
PostGIS function: BOX3D_to_LWGEOM(PG_FUNCTION_ARGS)

Alter BOX3D cast so that a valid geometry is always returned depending upon the size of the BOX3D. The code makes the following assumptions:

  • If the BOX3D is a single point then return a POINT geometry
  • If the BOX3D represents a line in any of X, Y or Z dimension, return a LINESTRING geometry
  • If the BOX3D represents a plane in the X, Y, or Z dimension, return a POLYGON geometry
  • Otherwise return a POLYHEDRALSURFACE geometry