Type tbox has several constructor functions depending on whether the value and/or the time extent are given. The value extent can be specified by a number or a span, while the time extent can be specified by a time type.
Constructor for tbox
tbox({number,numspan}) → tbox
tbox({timestamptz,tstzspan}) → tbox
tbox({number,numspan},{timestamptz,tstzspan}) → tbox
-- Both value and time dimensions SELECT tbox(1.0, timestamptz '2001-01-01'); SELECT tbox(floatspan '[1.0, 2.0)', tstzspan '[2001-01-01,2001-01-02)'); -- Only value dimension SELECT tbox(floatspan '[1.0,2.0)'); -- Only time dimension SELECT tbox(tstzspan '[2001-01-01,2001-01-02)');
Type stbox has several constructor functions depending on whether the space and/or the time extent are given. The coordinates for the spatial extent can be 2D or 3D and can be either Cartesian or geodetic. The spatial extent can be specified by the minimum and maximum coordinate values. The SRID can be specified in an optional last argument. If not given, a value 0 (respectively 4326) is assumed by default for planar (respectively geodetic) boxes. The spatial extent can also be specified by a geometry or a geography. The temporal extent can be specified by a time type.
Constructor for stbox
stboxX(float,float,float,float,srid integer=0) → stbox
stboxZ(float,float,float,float,float,float,srid integer=0) → stbox
stboxT({timestamptz,tstzspan}) → stbox
stboxXT(float,float,float,float,{timestamptz,tstzspan},srid integer=0) → stbox
stboxZT(float,float,float,float,float,float,{timestamptz,tstzspan},
srid integer=0) → stbox
geodstboxZ(float,float,float,float,float,float,srid integer=4326) → stbox
geodstboxZT(float,float,float,float,float,float,{timestamptz,tstzspan},
srid integer=4326) → stbox
stbox(geo) → stbox
stbox(geo,{timestamptz,tstzspan}) → stbox
-- Only value dimension with X and Y coordinates SELECT stboxX(1.0,2.0,1.0,2.0); -- Only value dimension with X, Y, and Z coordinates SELECT stboxZ(1.0,2.0,3.0,1.0,2.0,3.0); -- Only value dimension with X, Y, and Z coordinates and SRID SELECT stboxZ(1.0,2.0,3.0,1.0,2.0,3.0,5676); -- Only time dimension SELECT stboxT(tstzspan '[2001-01-03,2001-01-03]'); -- Both value (with X and Y coordinates) and time dimensions SELECT stboxXT(1.0,2.0, 1.0,2.0, tstzspan '[2001-01-03,2001-01-03]'); -- Both value (with X, Y, and Z coordinates) and time dimensions SELECT stboxZT(1.0,2.0,3.0, 1.0,2.0,3.0, tstzspan '[2001-01-03,2001-01-03]'); -- Only value dimension with X, Y, and Z geodetic coordinates SELECT geodstboxZ(1.0,2.0,3.0,1.0,2.0,3.0); -- Both value (with X, Y, and Z geodetic coordinates) and time dimensions SELECT geodstboxZT(1.0,2.0,3.0, 1.0,2.0,3.0, tstzspan '[2001-01-03,2001-01-04]'); -- Geometry and time dimension SELECT stbox(geometry 'Linestring(1 1 1,2 2 2)', tstzspan '[2001-01-03,2001-01-05]'); -- Geography and time dimension SELECT stbox(geography 'Linestring(1 1 1,2 2 2)', tstzspan '[2001-01-03,2001-01-05]');