You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
Geometry WKT passed to operation inputs may be valid WKT but produce invalid geometry. That is, the Python shapely geometry object's is_valid property is False. From Shapely User Manual, geometries are invalid in the following cases:
"A valid LinearRing may not cross itself or touch itself at a single point. A valid Polygon may not possess any overlapping exterior or interior rings. A valid MultiPolygon may not collect any overlapping polygons. Operations on invalid features may fail."
However, invalid polygons are quite likely. For example, many Glacier CCI Greenland polygons are invalid w.r.t. the above definition.
If we don't handle these cases with more tolerance, we cannot address #502 without a lot of user frustration.
The solution is straight forward using the Shaply Geometry.buffer method with zero distance:
"Passed a distance of 0, buffer() can be used to 'clean' self-touching or self-crossing polygons such as the classic 'bowtie'.".
Actual behavior
Cate raises an error with "invalid" geometries.
Steps to reproduce the problem
Invoke subset_spatial with invalid polygon WKT, e.g. from Glaciers CCI, greenland.
Specifications
Cate 1.0
The text was updated successfully, but these errors were encountered:
Expected behavior
Geometry WKT passed to operation inputs may be valid WKT but produce invalid geometry. That is, the Python
shapely
geometry object'sis_valid
property isFalse
. From Shapely User Manual, geometries are invalid in the following cases:"A valid
LinearRing
may not cross itself or touch itself at a single point. A validPolygon
may not possess any overlapping exterior or interior rings. A validMultiPolygon
may not collect any overlapping polygons. Operations on invalid features may fail."However, invalid polygons are quite likely. For example, many Glacier CCI Greenland polygons are invalid w.r.t. the above definition.
If we don't handle these cases with more tolerance, we cannot address #502 without a lot of user frustration.
The solution is straight forward using the Shaply
Geometry.buffer
method with zero distance:"Passed a
distance
of 0, buffer() can be used to 'clean' self-touching or self-crossing polygons such as the classic 'bowtie'.".Actual behavior
Cate raises an error with "invalid" geometries.
Steps to reproduce the problem
Invoke
subset_spatial
with invalid polygon WKT, e.g. from Glaciers CCI, greenland.Specifications
Cate 1.0
The text was updated successfully, but these errors were encountered: