Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Databricks SQL
Databricks Runtime 17.1 and above
Important
This feature is in Public Preview.
Note
This feature is not available on Databricks SQL Classic warehouses. To learn more about Databricks SQL warehouses, see SQL warehouse types.
Returns true if the two input GEOMETRY values are disjoint.
Syntax
st_disjoint ( geoExpr1, geoExpr2 )
Arguments
geoExpr1: The firstGEOMETRYvalue.geoExpr2: The secondGEOMETRYvalue.
Returns
A value of type BOOLEAN, indicating whether the two input GEOMETRY values are disjoint.
For more details and the formal definition, see the Disjoint predicate in the DE-9IM matrix definition.
The function returns NULL if any of the inputs is NULL.
Error conditions
- If the two input geometries have different SRID values, the function returns ST_DIFFERENT_SRID_VALUES.
Examples
-- Returns false if geometries are not disjoint.
> SELECT st_disjoint(st_geomfromtext('POINT(1 1)'),st_geomfromtext('POLYGON((0 0,10 0,0 10,0 0))'));
false
-- Returns true if geometries are disjoint.
> SELECT st_disjoint(st_geomfromtext('POINT(5 6)'),st_geomfromtext('POLYGON((0 0,10 0,0 10,0 0))'));
true