Skip to content

Commit

Permalink
Change for NewSat title
Browse files Browse the repository at this point in the history
  • Loading branch information
floeschau committed Jan 10, 2025
1 parent 5dbe06f commit 7b5ead3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
]
},
"properties": {
"title": "NEWSAT MS L1 2022-03-20 11:28:27",
"title": "NEWSAT MS L1_SR 2022-03-20 11:28:27",
"description": "scene_set_id: ece6d219-e452-4524-8fdc-c61c59727ecf",
"datetime": "2022-03-20T11:28:27.976967Z",
"processing:level": "l1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
]
},
"properties": {
"title": "NEWSAT MS L1 2023-10-30 20:08:17",
"title": "NEWSAT MS L1_SR 2023-10-30 20:08:17",
"description": "scene_set_id: 27b30afd-1c9a-4580-846c-7fe1ab55b46a--179598",
"datetime": "2023-10-30T20:08:17.595251Z",
"processing:level": "l1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
]
},
"properties": {
"title": "NEWSAT MS L1 2024-03-14 17:26:20",
"title": "NEWSAT MS L1_SR 2024-03-14 17:26:20",
"description": "scene_set_id: ff914eb4-1157-4509-9bc5-36f055cd8e6c",
"datetime": "2024-03-14T17:26:20.006816Z",
"processing:level": "l1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
"multispectral"
],
"constellation": "Aleph1",
"title": "NEWSAT MULTISPECTRAL L1D 2024-11-02 10:59:19",
"title": "NEWSAT MS L1D_SR 2024-11-02 10:59:19",
"processing:level": "l1d",
"providers": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,15 @@ private void FillTitleProperty(StacItem stacItem)
var properties = stacItem.Properties;
// title
properties.Remove("title");
string instruments = properties.GetProperty<string[]>("instruments").First();
if (instruments == "multispectral") instruments = "MS";
string processingLevel = properties.GetProperty<string>("processing:level").ToUpper();
if (stacItem.Id.Contains("_SR_") || stacItem.Id.EndsWith("_SR")) processingLevel += "_SR";
properties.Add("title", string.Format("{0} {1} {2} {3}",
//StylePlatform(properties.GetProperty<string>("platform")),
properties.GetProperty<string>("platform").ToUpper(),
properties.GetProperty<string[]>("instruments").First().ToUpper(),
properties.GetProperty<string>("processing:level").ToUpper(),
instruments.ToUpper(),
processingLevel,
properties.GetProperty<DateTime>("datetime").ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss", culture)));
}

Expand Down

0 comments on commit 7b5ead3

Please sign in to comment.