ST_DISJOINT()

All functions > GEOSPATIAL > ST_DISJOINT()

Returns TRUE if two geometries or geographies do not share any space.

Signatures

Disjoint

Returns: TRUE if A and B are disjoint

ST_DISJOINT(geo1: T, geo2: T) → BOOLEAN
sql
ParameterTypeRequiredDescription
geo1TYesFirst geometry or geography
geo2TYesSecond geometry or geography

With:

  • T : Custom types: GEOM_POINT | GEOM_LINESTRING | GEOM_POLYGON | GEOM_MULTIPOINT | GEOM_MULTILINESTRING | GEOM_MULTIPOLYGON | GEOM_MULTIANY | GEOG_POINT | GEOG_LINESTRING | GEOG_POLYGON | GEOG_MULTIPOINT | GEOG_MULTILINESTRING | GEOG_MULTIPOLYGON | GEOG_MULTIANY

Signature notes:

  • Equivalent to NOT ST_INTERSECTS(a, b)
  • On BigQuery: transpiled to NOT ST_INTERSECTS (no native ST_DISJOINT)
  • Both inputs must be the same type family
  • Returns NULL if either input is NULL

Examples

FeatureQL
SELECT
    f1 := ST_DISJOINT(ST_GEOMPOINT(0.0, 0.0), ST_GEOMPOINT(5.0, 5.0)), -- Two separate points
    f2 := ST_DISJOINT(ST_GEOMFROMTEXT('POLYGON ((0 0, 2 0, 2 2, 0 2, 0 0))'), ST_GEOMPOINT(1.0, 1.0)) -- Point inside polygon: not disjoint
;
Result
f1 BOOLEANf2 BOOLEAN
truefalse

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