Skip to content

Commit 4d55eb7

Browse files
committed
Unify invalid geometry handling for geospatial checks
1 parent 4c6c017 commit 4d55eb7

4 files changed

Lines changed: 293 additions & 79 deletions

File tree

‎docs/dqx/docs/reference/quality_checks.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ You can also define your own custom checks in Python (see [Creating custom check
8989
| `is_ogc_valid` | Checks whether the values in the input column are valid geometries in the OGC sense. I.e a bowtie polygon is invalid because it has a self intersection. This function requires Databricks serverless compute or runtime >= 17.1. | `column`: column to check (can be a string column name or a column expression); `convert_column`: when `True` (default), the column value is parsed with `try_to_geometry` (WKT, WKB, EWKT, EWKB, or GeoJSON); when `False`, the column is treated as a native GEOMETRY value. GEOGRAPHY is not supported (`st_isvalid` accepts GEOMETRY only) |
9090
| `is_non_empty_geometry` | Checks whether the values in the input column are non-empty geometries. This function requires Databricks serverless compute or runtime >= 17.1. | `column`: column to check (can be a string column name or a column expression); `convert_column`: when `True` (default), the column value is parsed with `try_to_geometry` (WKT, WKB, EWKT, EWKB, or GeoJSON); when `False`, the column is treated as a native GEOMETRY/GEOGRAPHY value |
9191
| `is_not_null_island` | Checks whether the values in the input column are NULL island geometries (e.g. POINT(0 0), POINTZ(0 0 0), or POINTZM(0 0 0 0)). This function requires Databricks serverless compute or runtime >= 17.1. | `column`: column to check (can be a string column name or a column expression); `convert_column`: when `True` (default), the column value is parsed with `try_to_geometry` (WKT, WKB, EWKT, EWKB, or GeoJSON); when `False`, the column is treated as a native GEOMETRY value. GEOGRAPHY is not supported (`st_x`/`st_y` accept POINT GEOMETRY only) |
92-
| `has_dimension` | Checks whether the values in the input column are geometries of the specified dimension (2D projected dimension). This function requires Databricks serverless compute or runtime >= 17.1. | `column`: column to check (can be a string column name or a column expression); `dimension`: dimension to check; `convert_column`: when `True` (default), the column value is parsed with `try_to_geometry` (WKT, WKB, EWKT, EWKB, or GeoJSON); when `False`, the column is treated as a native GEOMETRY/GEOGRAPHY value |
92+
| `has_dimension` | Checks whether the values in the input column are geometries of the specified dimension (2D projected dimension). This function requires Databricks serverless compute or runtime >= 17.1. | `column`: column to check (can be a string column name or a column expression); `dimension`: dimension to check; `convert_column`: when `True` (default), the column value is parsed with `try_to_geometry` (WKT, WKB, EWKT, EWKB, or GeoJSON); when `False`, the column is treated as a native GEOMETRY value. GEOGRAPHY is not supported (`st_dimension` accepts GEOMETRY only) |
9393
| `has_x_coordinate_between` | Checks whether the values in the input column are geometries with x coordinate between the provided boundaries. This function requires Databricks serverless compute or runtime >= 17.1. | `column`: column to check (can be a string column name or a column expression); `min_value`: minimum value; `max_value`: maximum value; `convert_column`: when `True` (default), the column value is parsed with `try_to_geometry` (WKT, WKB, EWKT, EWKB, or GeoJSON); when `False`, the column is treated as a native GEOMETRY value. GEOGRAPHY is not supported (`st_xmin`/`st_xmax` accept GEOMETRY only) |
9494
| `has_y_coordinate_between` | Checks whether the values in the input column are geometries with y coordinate between the provided boundaries. This function requires Databricks serverless compute or runtime >= 17.1. | `column`: column to check (can be a string column name or a column expression); `min_value`: minimum value; `max_value`: maximum value; `convert_column`: when `True` (default), the column value is parsed with `try_to_geometry` (WKT, WKB, EWKT, EWKB, or GeoJSON); when `False`, the column is treated as a native GEOMETRY value. GEOGRAPHY is not supported (`st_ymin`/`st_ymax` accept GEOMETRY only) |
9595
| `is_area_not_less_than` | Checks if the areas of values in a geometry column are not less than a specified limit. By default, the 2D Cartesian area in WGS84 (Pseudo-Mercator) with units of meters squared is used. An SRID can be specified to transform the input values and compute areas with specific units of measure. This function requires Databricks serverless compute or runtime >= 17.1. | `column`: column to check (can be a string column name or a column expression); `value`: value to use in the condition as number, column name or sql expression; `srid`: optional integer SRID to use for computing the area of the geometry or geography value (default `3857`); `geodesic`: whether to use the 2D geodesic area (default `False`); `convert_column`: when `True` (default), the column value is parsed with `try_to_geometry` (WKT, WKB, EWKT, EWKB, or GeoJSON); when `False`, the column is treated as a native GEOMETRY/GEOGRAPHY value |

0 commit comments

Comments
 (0)