Skip to content

Commit

Permalink
add sentinel-1 check to save_footprints (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
griembauer committed Oct 26, 2020
1 parent dccb785 commit 0e61c94
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,13 @@ def save_footprints(self, map_name):
("producttype", ogr.OFTString),
("identifier", ogr.OFTString)
])

# Sentinel-1 data does not have cloudcoverpercentage
prod_types = [type for type in self._products_df_sorted["producttype"]]
s1_types = ["SLC", "GRD"]
if any(type in prod_types for type in s1_types):
del attrs["cloudcoverpercentage"]

for key in attrs.keys():
field = ogr.FieldDefn(key, attrs[key])
layer.CreateField(field)
Expand Down

0 comments on commit 0e61c94

Please sign in to comment.