- Catégories :
ST_DISJOINT¶
Renvoie TRUE si les deux objets GEOGRAPHY sont disjoints (c’est-à-dire qu’ils ne partagent aucune partie de l’espace). ST_DISJOINT équivaut à NOT ST_INTERSECTS(expr1, expr2).
- Voir aussi :
Syntaxe¶
ST_DISJOINT( <geography_expression_1> , <geography_expression_2> )
Arguments¶
expression_géographie_1
Un objet GEOGRAPHY.
expression_géographie_2
Un objet GEOGRAPHY.
Renvoie¶
BOOLEAN.
Exemples¶
Les exemples suivants utilisent la fonction ST_DISJOINT pour déterminer si deux objets géospatiaux sont disjoints :
-- These two polygons are disjoint and do not intersect. SELECT ST_DISJOINT( TO_GEOGRAPHY('POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), TO_GEOGRAPHY('POLYGON((3 3, 5 3, 5 5, 3 5, 3 3))') ); +---------------------------------------------------------+ | ST_DISJOINT( | | TO_GEOGRAPHY('POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), | | TO_GEOGRAPHY('POLYGON((3 3, 5 3, 5 5, 3 5, 3 3))') | | ) | |---------------------------------------------------------| | True | +---------------------------------------------------------+-- These two polygons intersect and are not disjoint. SELECT ST_DISJOINT( TO_GEOGRAPHY('POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), TO_GEOGRAPHY('POLYGON((1 1, 3 1, 3 3, 1 3, 1 1))') ); +---------------------------------------------------------+ | ST_DISJOINT( | | TO_GEOGRAPHY('POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))'), | | TO_GEOGRAPHY('POLYGON((1 1, 3 1, 3 3, 1 3, 1 1))') | | ) | |---------------------------------------------------------| | False | +---------------------------------------------------------+