equinor / xtgeo

XTGeo Python class library for subsurface Surfaces, Cubes, Wells, Grids, Points, etc
https://xtgeo.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
109 stars 57 forks source link

ENH: Add grid boundary polygons #1169

Closed tnatt closed 7 months ago

tnatt commented 7 months ago

PR which resolves #925 and adds a new method grid.get_boundary_polygons() for extracting boundary polygons from a grid instance.

Key notes:

This new method forms the basis for a potential future method with a more simplified user-interface for extracting boundaries around unique values in a discrete property. This should be added after adding support for polygon attributes #900, so that we can have a NAME attribute that corresponds to the code name.

codecov-commenter commented 7 months ago

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (33652a2) 80.08% compared to head (f79b42b) 80.01%. Report is 4 commits behind head on main.

Files Patch % Lines
src/xtgeo/grid3d/_grid_boundary.py 68.75% 7 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1169 +/- ## ========================================== - Coverage 80.08% 80.01% -0.07% ========================================== Files 97 98 +1 Lines 13612 13700 +88 Branches 2186 2199 +13 ========================================== + Hits 10901 10962 +61 - Misses 1981 2006 +25 - Partials 730 732 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.