Name

ST_Disjoint — Tests if a Geometry is spatially disjoint from another Geometry.

Synopsis

boolean ST_Disjoint(bytea GeomA, bytea GeomB);

Alias

Disjoint

Description

Tests if a Geometry is spatially disjoint from another Geometry, retuns TRUE if so.

The disjoint predicate has the following equivalent definitions:

  • The two geometries have no point in common

  • In mathematical terms: a.Disjoint(b) «-» a ∩ b = ᴓ

  • Expressed in terms of the DE-9IM:

    Equation 9.0. 

    a.Disjoint(b) «-» (I(a)∩I(b) = ᴓ) Ʌ (I(a) ∩ B(b) = ᴓ) Ʌ (B(a) ∩I(b) = ᴓ) Ʌ (B(a) ∩ B(b) = ᴓ)

  • The DE-9IM Intersection Matrix is: [FF*FF****]

[Caution]

This method does not support GeometryCollection arguments

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
2.1.1.2 , 2.1.13.37.2.19.17.2.8.15.1.26

Examples

SELECT ST_Disjoint(ga,gb) from 
(SELECT ST_GeomFromText('POLYGON ((10 30, 0 10, 30 20, 30 30, 20 40, 10 30))') as ga, 
        ST_GeomFromText('POLYGON ((40 30, 40 20, 60 40, 50 40, 40 30))') as gb) as foo;

 st_disjoint
-------------
 t

SELECT ST_Disjoint(ga,gb) from 
(SELECT ST_GeomFromText('POLYGON ((3 3, 3 8, 8 8, 8 3, 3 3))') as ga, 
        ST_GeomFromText('POLYGON ((1 1, 1 6, 5 6, 5 1, 1 1))') as gb) as foo;

 st_disjoint
-------------
 f

Related functions

ST_Intersects, ST_Relate