Skip to content

Commit

Permalink
STAC asset name ('cloud_mask') for NewSat
Browse files Browse the repository at this point in the history
  • Loading branch information
floeschau committed Jan 10, 2025
1 parent 6f1a9a4 commit bf41b7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
],
"filename": "20241102_105919_SN48_L1D_SR_MS_TOA_0.tif"
},
"cloud": {
"cloud_mask": {
"type": "application/xml",
"roles": [
"cloud"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ protected override async Task<StacNode> ExtractMetadata(IItem item, string suffi
// add L3 visual tif asset
bool x = AddL3Assets(item, stacItem) || AddL1Assets(item, stacItem);

if (!stacItem.Assets.ContainsKey("cloud_mask") && stacItem.Assets.ContainsKey("cloud"))
{
stacItem.Assets["cloud_mask"] = stacItem.Assets["cloud"];
stacItem.Assets.Remove("cloud");
}

return StacNode.Create(stacItem, item.Uri);
}

Expand Down

0 comments on commit bf41b7a

Please sign in to comment.