All Products
Search
Document Center

ApsaraDB RDS:ST_Disjoint

Last Updated:Mar 28, 2026

Returns true if two geometry objects share no points in common, and false otherwise.

Syntax

boolean ST_Disjoint(geometry a, geometry b);

Parameters

ParameterDescription
aThe first geometry object.
bThe second geometry object.

Return value

boolean

  • Returns true if the two geometry objects are disjoint (no shared points).

  • Returns false if the objects share one or more points.

Usage notes

  • ST_Disjoint(A, B) is equivalent to A ∩ B = ∅. If any Overlap, Touch, or Within condition holds for the two objects, the function returns false.

  • 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)