Relationships

A relationship compares any two values and returns a result of true or false.

They can either compare scalar values or spatial geometries.

Scalar Relationships

A scalar relationship compares any two values (boolean, integers, real numbers, dates or strings).

The result is evaluated as true or false, returning true if the values have the specified relationship.

Relationships include equal, not equal, less than, greater than etc., as well as relationships specifically for string: contains, begins with, ends with or matches a regular expression.

ClosedTypes of Scalar Relationships

Spatial Relationships

A spatial relationship is a type of relationship only applied to geometry values. It returns true if the geometries have the specified relationship.

Any type of geometry can be passed into a spatial relationship check, but only the geometry types relevant to this spatial relationship will be tested. For example, if comparing areas, line geometries will not be tested.

Note: Some spatial relationships can be considered subsets of others. For example, Covered By is a subset of Within (if a geometry is Covered By another geometry, it is also Within that geometry).

The detailed description of each spatial relationship uses the terms interior, boundary, exterior. See Geometries for more information on these terms.

ClosedTypes of Spatial Relationships