_log.debug(f"Uploading {path} to {self.bucket_file_prefixifself.bucket_file_prefix.endswith('/')elseself.bucket_file_prefix+'/'}{os.path.basename(path)}")
# produce single metatada for all items if specified by flag
json_str = (json.dumps(item.to_dict(), indent=4))
#printing metadata.json test output file
with open(metadata_item_path, "w+") as metadata:
...
...
@@ -229,7 +282,9 @@ class Raster2STAC():
media_type=pystac.MediaType.JSON,
)
)
# self.stac_collection.add_item(item)
# Append the item to the list instead of adding it to the collection
item_dict=item.to_dict()
item_list.append(copy.deepcopy(item_dict))# If we don't get a deep copy, the properties datetime gets overwritten in the next iteration of the loop, don't know why.