These operators test whether the bounding boxes of their arguments satisfy the predicate and result in a Boolean value. As stated in Chapter 4, Temporal Types, the bounding box associated to a temporal type depends on the base type: It is the tstzspan
type for the tbool
and ttext
types, the tbox
type for the tint
and tfloat
types, and the stbox
type for the tgeompoint
and tgeogpoint
types. Furthermore, as seen in the section called “Conversions”, many PostgreSQL, PostGIS, or MobilityDB types can be converted to the tbox
and stbox
types. For example, numeric and span types can be converted to type tbox
, types geometry
and geography
can be converted to type stbox
, and time types and temporal types can be converted to types tbox
and stbox
.
A first set of operators consider the topological relationships between the bounding boxes. There are five topological operators: overlaps (&&
), contains (@>
), contained (<@
), same (~=
), and adjacent (-|-
). The arguments of these operators can be a base type, a box, or a temporal type and the operators verify the topological relationship taking into account the value and/or the time dimension depending on the type of the arguments.
Another set of operators consider the relative position of the bounding boxes. The operators <<
, >>
, &<
, and &>
consider the value dimension for tint
and tfloat
types and the X coordinates for the tgeompoint
and tgeogpoint
types, the operators <<|
, |>>
, &<|
, and |&>
consider the Y coordinates for the tgeompoint
and tgeogpoint
types, the operators <</
, />>
, &</
, and /&>
consider the Z coordinates for the tgeompoint
and tgeogpoint
types, and the operators <<#
, #>>
, #&<
, and #&>
consider the time dimension for all temporal types.
Finally, it is worth noting that the bounding box operators allow to mix 2D/3D geometries but in that case, the computation is only performed on 2D.
We refer to the section called “Bounding Box Operations” for the bounding box operators.