Skip to content

Commit

Permalink
fix output_to_gdf filter bug
Browse files Browse the repository at this point in the history
  • Loading branch information
2320sharon committed Sep 26, 2023
1 parent 7ed70d6 commit 574b5c3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/coastsat/SDS_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ def create_gdf(
shoreline: List[List[float]],
date: datetime,
satname: str,
geoaccuracy: float,
geoaccuracy: Union[float, str],
cloud_cover: float,
idx: int,
geomtype: str,
Expand All @@ -851,8 +851,8 @@ def create_gdf(
Date associated with the shoreline.
satname: str
Satellite name.
geoaccuracy: float
Geo accuracy value.
geoaccuracy: float or string
Geo accuracy value, can be float for landsat or PASSED/FAILED for S2
cloud_cover: float
Cloud cover value.
idx: int
Expand Down Expand Up @@ -917,7 +917,7 @@ def output_to_gdf(
# we use filter(None,shoreline_gdf) to not include any empty shorelines which is indicated by create_gdf returning None
gdf_list = list(
filter(
None,
lambda gdf: not gdf.empty if gdf is not None else False,
map(
lambda idx: create_gdf(
output["shorelines"][idx],
Expand Down

0 comments on commit 574b5c3

Please sign in to comment.