Commit 322a88ce authored by Daniel Scheffler's avatar Daniel Scheffler

Bugfix for always raising a RuntimeWarning in fill_holes_within_poly().

Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 39c33235
Pipeline #15839 passed with stage
in 32 seconds
......@@ -11,6 +11,7 @@ History
* Added Test_mapXY2imXY(), Test_imXY2mapXY(), Test_pixelToLatLon(), Test_latLonToPixel().
* Removed GDAL dataset input parameters from some functions.
* Revised code style and some docstrings. Added some typehints.
* Bugfix for always raising a RuntimeWarning in fill_holes_within_poly().
0.16.1 (2020-11-03)
......
......@@ -198,7 +198,7 @@ def fill_holes_within_poly(poly):
GDF_row.geometry.equals(largest_poly_filled),
axis=1)
if False in gdf.within_or_equal:
if False in gdf.within_or_equal.values:
n_disjunct_polys = int(np.sum(~gdf.within_or_equal))
warnings.warn(RuntimeWarning('The given MultiPolygon contains %d disjunct polygone(s) outside of the '
'largest polygone. fill_holes_within_poly() will only return the largest '
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment