snowflake.snowpark.functions.st_disjoint¶

snowflake.snowpark.functions.st_disjoint(geography_or_geometry_expression_1: Union[snowflake.snowpark.column.Column, str], geography_or_geometry_expression_2: Union[snowflake.snowpark.column.Column, str]) → Column[source]¶

Returns TRUE if the two GEOGRAPHY or GEOMETRY objects are disjoint (do not intersect). Returns FALSE otherwise.

Parameters:
  • geography_or_geometry_expression_1 (ColumnOrName) – A GEOGRAPHY or GEOMETRY object.

  • geography_or_geometry_expression_2 (ColumnOrName) – A GEOGRAPHY or GEOMETRY object.

Returns:

Boolean values indicating whether the two geography or geometry objects are disjoint.

Return type:

Column

Examples::
>>> from snowflake.snowpark.functions import col, to_geography
>>> df = session.create_dataframe([
...     ["POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))", "POLYGON((3 3, 5 3, 5 5, 3 5, 3 3))"],
...     ["POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))", "POLYGON((1 1, 3 1, 3 3, 1 3, 1 1))"]
... ], schema=["geog1", "geog2"])
>>> df.select(st_disjoint(to_geography(col("geog1")), to_geography(col("geog2"))).alias("disjoint")).collect()
[Row(DISJOINT=True), Row(DISJOINT=False)]
Copy