Closed ruanqizhen closed 6 months ago
@ruanqizhen The polygon is invalid for Difference
operation because it has nested holes
You can use ST_ExteriorRing (https://sedona.apache.org/1.5.1/api/sql/Function/#st_exteriorring) to only use the exterior ring.
A similar issue has been reported on JTS repo: https://github.com/locationtech/jts/issues/303
@ruanqizhen The polygon is invalid for
Difference
operation because it has nested holesYou can use ST_ExteriorRing (https://sedona.apache.org/1.5.1/api/sql/Function/#st_exteriorring) to only use the exterior ring.
A similar issue has been reported on JTS repo: locationtech/jts#303
Hi Jia, thank you for the information.
I need to keep the nested holes, is there a way to process "difference" operation with the nested holes?
@ruanqizhen I don't think it is possible to process the difference function with that. You have to use the exterior ring or take those nested holes out as the individual polygons
Behavior
I'm processing some of the OSM geometries, and encountered an exception for both ST_Difference and ST_SymDifference function.
Steps to reproduce the problem
run this query:
Tacktrace:
Settings
Sedona version = 1.5.0
Apache Spark version = 3.2.1
Apache Flink version = ?
API type = Python
Scala version =
JRE version =
Python version = 3.10
Environment = AWS Athena