Skip to content

Commit

Permalink
modify test close_holes and merge_vector
Browse files Browse the repository at this point in the history
  • Loading branch information
mdupaysign committed May 13, 2024
1 parent d710577 commit de18761
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lidro/merge_mask_hydro/vectors/close_holes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def close_holes(polygon, min_hole_area):
# Create polygons from each exterior contour without holes
exterior_polygons = [Polygon(ring) for ring in exterior_contours]
# Merge all polygons into a single encompassing shape
unified_shape = unary_union(polygons)
unified_shape = unary_union(exterior_polygons)

# Interior Hydro Mask
interiors_to_keep = [
Expand Down
2 changes: 1 addition & 1 deletion test/vectors/test_merge_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ def test_create_hydro_vector_mask_default():
assert gdf.crs.to_string() == crs # CRS is identical
assert all(isinstance(geom, Polygon) for geom in gdf.geometry) # All geometry should Polygons

expected_number_of_geometries = 1
expected_number_of_geometries = 3
assert len(gdf) == expected_number_of_geometries # One geometry

0 comments on commit de18761

Please sign in to comment.