These operators consider the relative position of the bounding boxes. The operators <<
, >>
, &<
, and &>
consider the X value for the tbox
type and the X coordinates for the stbox
type, the operators <<|
, |>>
, &<|
, and |&>
consider the Y coordinates for the stbox
type, the operators <</
, />>
, &</
, and /&>
consider the Z coordinates for the stbox
type, and the operators <<#
, #>>
, #&<
, and #&>
consider the time dimension for the tbox
and stbox
types. The operators raise an error if both boxes do not have the required dimension.
The operators for the numeric value dimension of the tbox
type are given next.
Are the X values of the first bounding box strictly less than those of the second one?
tbox << tbox: boolean
SELECT tbox 'TBOX((1,2012-01-01),(2,2012-01-02))' << tbox 'TBOX((3,2012-01-03),(4,2012-01-04))'; -- true SELECT tbox 'TBOX((1,2012-01-01),(2,2012-01-02))' << tbox 'TBOX((,2012-01-03),(,2012-01-04))'; -- ERROR: Boxes must have X dimension
Are the X values of the first bounding box strictly greater than those of the second one?
tbox >> tbox: boolean
SELECT tbox 'TBOX((3,2012-01-03),(4,2012-01-04))' >> tbox 'TBOX((1,2012-01-01),(2,2012-01-02))'; -- true
Are the X values of the first bounding box not greater than those of the second one?
tbox &< tbox: boolean
SELECT tbox 'TBOX((1,2012-01-01),(4,2012-01-04))' &< tbox 'TBOX((3,2012-01-03),(4,2012-01-04))'; -- true
Are the X values of the first bounding box not less than those of the second one?
tbox &> tbox: boolean
SELECT tbox 'TBOX((1,2012-01-01),(2,2012-01-02))' &> tbox 'TBOX((1,2012-01-01),(4,2012-01-04))'; -- true
The operators for the spatial value dimension of the stbox
type are given next.
Are the X values of the first bounding box strictly to the left of those of the second one?
stbox << stbox: boolean
SELECT stbox 'STBOX Z((1,1,1),(2,2,2))' << stbox 'STBOX Z((3,3,3),(4,4,4))'; -- true
Are the X values of the first bounding box strictly to the right of those of the second one?
stbox >> stbox: boolean
SELECT stbox 'STBOX Z((3,3,3),(4,4,4))' >> stbox 'STBOX Z((1,1,1),(2,2,2))'; -- true
Are the X values of the first bounding box not to the right of those of the second one?
stbox &< stbox: boolean
SELECT stbox 'STBOX Z((1,1,1),(4,4,4))' &< stbox 'STBOX Z((3,3,3),(4,4,4))'; -- true
Are the X values of the first bounding box not to the left of those of the second one?
stbox &> stbox: boolean
SELECT stbox 'STBOX Z((3,3,3),(4,4,4))' &> stbox 'STBOX Z((1,1,1),(2,2,2))'; -- true
Are the Y values of the first bounding box strictly below of those of the second one?
stbox <<| stbox: boolean
SELECT stbox 'STBOX Z((1,1,1),(2,2,2))' <<| stbox 'STBOX Z((3,3,3),(4,4,4))'; -- true
Are the Y values of the first bounding box strictly above of those of the second one?
stbox |>> stbox: boolean
SELECT stbox 'STBOX Z((3,3,3),(4,4,4))' |>> stbox 'STBOX Z((1,1,1),(2,2,2))'; -- true
Are the Y values of the first bounding box not above of those of the second one?
stbox &<| stbox: boolean
SELECT stbox 'STBOX Z((1,1,1),(4,4,4))' &<| stbox 'STBOX Z((3,3,3),(4,4,4))'; -- true
Are the Y values of the first bounding box not below of those of the second one?
stbox |&> stbox: boolean
SELECT stbox 'STBOX Z((3,3,3),(4,4,4))' |&> stbox 'STBOX Z((1,1,1),(2,2,2))'; -- false
Are the Z values of the first bounding box strictly in front of those of the second one?
stbox <</ stbox: boolean
SELECT stbox 'STBOX Z((1,1,1),(2,2,2))' <</ stbox 'STBOX Z((3,3,3),(4,4,4))';
Are the Z values of the first bounding box strictly back of those of the second one?
stbox />> stbox: boolean
SELECT stbox 'STBOX Z((3,3,3),(4,4,4))' />> stbox 'STBOX Z((1,1,1),(2,2,2))'; -- true
Are the Z values of the first bounding box not back of those of the second one?
stbox &</ stbox: boolean
SELECT stbox 'STBOX Z((1,1,1),(4,4,4))' &</ stbox 'STBOX Z((3,3,3),(4,4,4))'; -- true
Are the Z values of the first bounding box not in front of those of the second one?
stbox /&> stbox: boolean
SELECT stbox 'STBOX Z((3,3,3),(4,4,4))' /&> stbox 'STBOX Z((1,1,1),(2,2,2))'; -- true
The operators for the time dimension of the tbox
and stbox
types are as follows.
Are the T values of the first bounding box strictly before those of the second one?
box <<# box: boolean
SELECT tbox 'TBOX((1,2000-01-01),(2,2000-01-02))' <<# tbox 'TBOX((3,2000-01-03),(4,2000-01-04)))'; -- true
Are the T values of the first bounding box strictly after those of the second one?
box #>> box: boolean
SELECT stbox 'STBOX T((3,3,2000-01-03),(4,4,2000-01-04))' #>> stbox 'STBOX T((1,1,2000-01-01),(2,2,2000-01-02))'; -- true
Are the T values of the first bounding box not after those of the second one?
box &<# box: boolean
SELECT tbox 'TBOX((1,2000-01-01),(4,2000-01-04))' &<# tbox 'TBOX((3,2000-01-03),(4,2000-01-04)))'; -- true
Are the T values of the first bounding box not before those of the second one?
box #&> box: boolean
SELECT stbox 'STBOX T((1,1,2000-01-01),(3,3,2000-01-03))' #&> stbox 'STBOX T((3,3,2000-01-03),(4,4,2000-01-04))'; -- true