Closed tnatt closed 7 months ago
Attention: 3 lines
in your changes are missing coverage. Please review.
Comparison is base (
6addf60
) 80.08% compared to head (45835d9
) 80.08%.
Files | Patch % | Lines |
---|---|---|
src/xtgeo/xyz/_polygons_oper.py | 86.36% | 2 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
PR to address #1160. After changing to using shapely to create boundary polygons for surfaces in #1140, it seems shapely in some cases fails to create the polygons. Leading to the "POLY_ID" error which derives from an empty polygon and hence an empty dataframe.
This PR should add more robustness to the boundary polygons method by:
Added noding of the linestrings before running the polygonize function to handle potensial crossing lines. See https://github.com/shapely/shapely/issues/1736
Fixing a bug that sometimes created small triangular polygons along the boundary. This cleans up the dataset before running the shapely polygonize function. (This was the case for our complex test case, hence some adjustment was needed there.)
Lastly if in case the dataset is truly unfit for creating a boundary and the polygon returns empty, a more proper error massage is returned before coming to the confusing "POLY_ID" one.