ST_OVERLAPS()

All functions > GEOSPATIAL > ST_OVERLAPS()

Returns TRUE if two geometries of the same dimension have overlapping interiors.

Signatures

Overlaps

Returns: TRUE if A overlaps B

ST_OVERLAPS(geo1: T, geo2: T) → BOOLEAN
sql
ParameterTypeRequiredDescription
geo1TYesFirst geometry
geo2TYesSecond geometry

With:

  • T : Custom types: GEOM_POINT | GEOM_LINESTRING | GEOM_POLYGON | GEOM_MULTIPOINT | GEOM_MULTILINESTRING | GEOM_MULTIPOLYGON | GEOM_MULTIANY

Signature notes:

  • Only meaningful when both operands have the same dimension (Polygon/Polygon, Line/Line)
  • Different dimensions always return FALSE
  • Not supported on BigQuery
  • GEOMETRY only (no GEOGRAPHY overload)
  • Returns NULL if either input is NULL

Examples

FeatureQL
SELECT
    f1 := ST_OVERLAPS(ST_GEOMFROMTEXT('POLYGON ((0 0, 3 0, 3 3, 0 3, 0 0))'), ST_GEOMFROMTEXT('POLYGON ((2 2, 5 2, 5 5, 2 5, 2 2))')), -- Two partially overlapping polygons
    f2 := ST_OVERLAPS(ST_GEOMFROMTEXT('POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0))'), ST_GEOMFROMTEXT('POLYGON ((5 5, 6 5, 6 6, 5 6, 5 5))')) -- Two disjoint polygons do not overlap
;
Result
f1 BOOLEANf2 BOOLEAN
truefalse

Last update at: 2026/05/26 17:22:09