This topic describes the ST_Disjoint function. This function checks whether two geometry objects do not touch each other. If the geometry objects do not touch each other, this function returns True. Otherwise, this function returns False.

Syntax

boolean  ST_Disjoint(geometry  a , geometry  b);

Parameters

Parameter Description
a The first geometry object that you want to specify.
b The second geometry object that you want to specify.

Description

  • If one of the Overlap, Touch, and Within conditions evaluates to True for the geometry objects that you specify, this function returns False. Otherwise, this function returns True.
  • This function does not use indexes.

Examples

Compare two geometry objects by using the default parameter settings.
SELECT ST_Disjoint('LINESTRING(0 0,-3 -3)'::geometry,'LINESTRING(0 1,1 0)'::geometry);
 st_disjoint
-------------
 t
(1 row)