databricks.labs.dqx.geo.check_funcs
is_latitude
@register_rule("row")
def is_latitude(column: str | Column) -> Column
Checks whether the values in the input column are valid latitudes.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are valid latitudes
is_longitude
@register_rule("row")
def is_longitude(column: str | Column) -> Column
Checks whether the values in the input column are valid longitudes.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are valid longitudes
is_geometry
@register_rule("row")
def is_geometry(column: str | Column) -> Column
Checks whether the values in the input column are valid geometries.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are valid geometries
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
is_geography
@register_rule("row")
def is_geography(column: str | Column) -> Column
Checks whether the values in the input column are valid geographies.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are valid geographies
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
is_point
@register_rule("row")
def is_point(column: str | Column) -> Column
Checks whether the values in the input column are point geometries.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are point geometries
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
is_linestring
@register_rule("row")
def is_linestring(column: str | Column) -> Column
Checks whether the values in the input column are linestring geometries.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are linestring geometries
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
is_polygon
@register_rule("row")
def is_polygon(column: str | Column) -> Column
Checks whether the values in the input column are polygon geometries.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are polygon geometries
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
is_multipoint
@register_rule("row")
def is_multipoint(column: str | Column) -> Column
Checks whether the values in the input column are multipoint geometries.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are multipoint geometries
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
is_multilinestring
@register_rule("row")
def is_multilinestring(column: str | Column) -> Column
Checks whether the values in the input column are multilinestring geometries.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are multilinestring geometries
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
is_multipolygon
@register_rule("row")
def is_multipolygon(column: str | Column) -> Column
Checks whether the values in the input column are multipolygon geometries.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are multipolygon geometries
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
is_geometrycollection
@register_rule("row")
def is_geometrycollection(column: str | Column) -> Column
Checks whether the values in the input column are geometrycollection geometries.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are geometrycollection geometries
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
is_ogc_valid
@register_rule("row")
def is_ogc_valid(column: str | Column) -> Column
Checks whether the values in the input column are valid geometries in the OGC sense.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are valid geometries
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
is_non_empty_geometry
@register_rule("row")
def is_non_empty_geometry(column: str | Column) -> Column
Checks whether the values in the input column are empty geometries.
Arguments:
column
- column to check; can be a string column name or a column expression
Returns:
Column object indicating whether the values in the input column are empty geometries
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
has_dimension
@register_rule("row")
def has_dimension(column: str | Column, dimension: int) -> Column
Checks whether the geometries/geographies in the input column have a given dimension.
Arguments:
column
- column to check; can be a string column name or a column expressiondimension
- required dimension of the geometries/geographies
Returns:
Column object indicating whether the geometries/geographies in the input column have a given dimension
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
has_x_coordinate_between
@register_rule("row")
def has_x_coordinate_between(column: str | Column, min_value: float,
max_value: float) -> Column
Checks whether the x coordinates of the geometries in the input column are between a given range.
Arguments:
column
- column to check; can be a string column name or a column expressionmin_value
- minimum value of the x coordinatesmax_value
- maximum value of the x coordinates
Returns:
Column object indicating whether the x coordinates of the geometries in the input column are between a given range
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.
has_y_coordinate_between
@register_rule("row")
def has_y_coordinate_between(column: str | Column, min_value: float,
max_value: float) -> Column
Checks whether the y coordinates of the geometries in the input column are between a given range.
Arguments:
column
- column to check; can be a string column name or a column expressionmin_value
- minimum value of the y coordinatesmax_value
- maximum value of the y coordinates
Returns:
Column object indicating whether the y coordinates of the geometries in the input column are between a given range
Notes:
This function requires Databricks serverless compute or runtime 17.1 or above.