furqaankhan commented on code in PR #1474: URL: https://github.com/apache/sedona/pull/1474#discussion_r1634042386
########## docs/api/sql/Function.md: ########## @@ -2111,6 +2111,41 @@ Output: false ``` +## ST_IsValidDetail + +Introduction: Returns a row, containing a boolean `valid` stating if a geometry is valid, a string `reason` stating why it is invalid and a geometry `location` pointing out where it is invalid. + +This function is a combination of [ST_IsValid](#st_isvalid) and [ST_IsValidReason](#st_isvalidreason). + +The flags parameter is a bitfield with the following options: + +- 0 (default): Use usual OGC SFS (Simple Features Specification) validity semantics. +- 1: "ESRI flag", Accepts certain self-touching rings as valid, which are considered invalid under OGC standards. + +Formats: + +```sql +ST_IsValidDetail(geom: Geometry) +``` + +```sql +ST_IsValidDetail(geom: Geometry, flag: Integer) +``` + +Since: `v1.6.1` + +SQL Example: + +```sql +SELECT ST_IsValidDetail(ST_GeomFromWKT('POLYGON ((30 10, 40 40, 20 40, 30 10, 10 20, 30 10))')) +``` + +Output: + +``` +{false, Ring Self-intersection at or near point (30.0, 10.0, NaN), POINT (30 10)} Review Comment: Will make the change. This function can't be ported to Flink as Flink doesn't support struct type, you made me aware of it, hence no docs for Flink. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@sedona.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org