ST_Disjoint¶
Returns true if geomA is disjoint from geomB.
Usage¶
boolean ST_Disjoint(geomA: geometry, geomB: geometry)
boolean ST_Disjoint(geogA: geography, geogB: geography)
Arguments¶
- geogA (geography): Input geography
- geogB (geography): Input geography
- geomA (geometry): Input geometry
- geomB (geometry): Input geometry
Description¶
Returns true if the two geometries do not share any points. This is
the inverse of ST_Intersects.
Examples¶
SELECT ST_Disjoint(
ST_GeomFromText('POLYGON ((0 0, 1 0, 0 1, 0 0))'),
ST_GeomFromText('POLYGON ((2 2, 3 2, 2 3, 2 2))')
);
┌──────────────────────────────────────────────────────────────────────────────┐
│ st_disjoint(st_geomfromtext(Utf8("POLYGON ((0 0, 1 0, 0 1, 0 0))")),st_geomf │
│ romtext(Utf8("POLYGON ((2 2, 3 2, 2 3, 2 2))")))… │
╞══════════════════════════════════════════════════════════════════════════════╡
│ true │
└──────────────────────────────────────────────────────────────────────────────┘
SELECT ST_Disjoint(
ST_GeogFromText('POLYGON ((0 0, 1 0, 0 1, 0 0))'),
ST_GeogFromText('POLYGON ((2 2, 3 2, 2 3, 2 2))')
);
┌──────────────────────────────────────────────────────────────────────────────┐
│ st_disjoint(st_geogfromtext(Utf8("POLYGON ((0 0, 1 0, 0 1, 0 0))")),st_geogf │
│ romtext(Utf8("POLYGON ((2 2, 3 2, 2 3, 2 2))")))… │
╞══════════════════════════════════════════════════════════════════════════════╡
│ true │
└──────────────────────────────────────────────────────────────────────────────┘