Returns true if two geometry objects share no points in common, and false otherwise.
Syntax
boolean ST_Disjoint(geometry a, geometry b);Parameters
| Parameter | Description |
|---|---|
a | The first geometry object. |
b | The second geometry object. |
Return value
boolean
Returns
trueif the two geometry objects are disjoint (no shared points).Returns
falseif the objects share one or more points.
Usage notes
ST_Disjoint(A, B)is equivalent toA ∩ B = ∅. If any Overlap, Touch, or Within condition holds for the two objects, the function returnsfalse.This function does not use indexes.
Examples
SELECT ST_Disjoint(
'LINESTRING(0 0,-3 -3)'::geometry,
'LINESTRING(0 1,1 0)'::geometry
); st_disjoint
-------------
t
(1 row)