Name

ST_Disjoint — Tests if two geometries have no points in common

Synopsis

boolean ST_Disjoint( geometry A , geometry B );

Description

Returns true if two geometries are disjoint. Geometries are disjoint if they have no point in common.

If any other spatial relationship is true for a pair of geometries, they are not disjoint. Disjoint implies that ST_Intersects is false.

In mathematical terms: ST_Disjoint(A, B) ⇔ A ⋂ B = ∅

Enhanced: 3.0.0 enabled support for GEOMETRYCOLLECTION

Performed by the GEOS module

[Note]

Neither this function nor NOT ST_Intersects(A, B) provides an index condition. To find rows with no intersection in another table, put the positive ST_Intersects predicate inside a NOT EXISTS subquery. See Section 5.2, “Using Spatial Indexes” for an example.

[Note]

NOTE: this is the "allowable" version that returns a boolean, not an integer.

This method implements the OGC Simple Features Implementation Specification for SQL 1.1. s2.1.1.2 //s2.1.13.3 - a.Relate(b, 'FF*FF****')

This method implements the SQL/MM specification. SQL-MM 3: 5.1.26

Examples

Code
SELECT ST_Disjoint('POINT(0 0)'::geometry, 'LINESTRING ( 2 0,0 2 )'::geometry);
Output
t
Figure
Geometry figure for visual-st-disjoint-01
Code
SELECT ST_Disjoint('POINT(0 0)'::geometry, 'LINESTRING ( 0 0,0 2 )'::geometry);
Output
f
Figure
Geometry figure for visual-st-disjoint-02

See Also

ST_Intersects