Skip to content

Commit

Permalink
Changes for NewSat and WorldView metadata extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
floeschau committed Jan 9, 2025
1 parent 28e9466 commit 85983a8
Show file tree
Hide file tree
Showing 23 changed files with 3,237 additions and 24 deletions.
11 changes: 6 additions & 5 deletions src/Stars.Console/Operations/CopyOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Threading.Tasks;
using McMaster.Extensions.CommandLineUtils;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using Stac;
using Terradue.Stars.Interface;
Expand Down Expand Up @@ -192,7 +193,7 @@ private async Task<object> CopyItemAsync(IItem item, IRouter router, object stat
throw new InvalidDataException(string.Format("Impossible to translate item {0} into STAC.", item.Uri));
}

logger.Output(string.Format("Copy item {0} from {1}", stacItemNode.Id, item.Uri));
logger.LogInformation(string.Format("Copy item {0} from {1}", stacItemNode.Id, item.Uri));

// We update the destination in case a new router updated the route
IDestination destination = operationState.CurrentDestination.To(stacItemNode);
Expand Down Expand Up @@ -224,14 +225,14 @@ private async Task<object> CopyItemAsync(IItem item, IRouter router, object stat
IResource supplierNode = null;
try
{
logger.Output(string.Format("[{0}] Searching for {1}", supplier.Value.Id, stacItemNode.Uri.ToString()));
logger.LogInformation(string.Format("[{0}] Searching for {1}", supplier.Value.Id, stacItemNode.Uri.ToString()));
supplierNode = await supplier.Value.SearchForAsync(stacItemNode, ct);
if (supplierNode == null && supplierNode is not IAssetsContainer)
{
logger.Output(string.Format("[{0}] --> no supply possible", supplier.Value.Id));
logger.LogInformation(string.Format("[{0}] --> no supply possible", supplier.Value.Id));
continue;
}
logger.Output(string.Format("[{0}] resource found at {1} [{2}]", supplier.Value.Id, supplierNode.Uri, supplierNode.ContentType));
logger.LogInformation(string.Format("[{0}] resource found at {1} [{2}]", supplier.Value.Id, supplierNode.Uri, supplierNode.ContentType));
}
catch (Exception e)
{
Expand Down Expand Up @@ -281,7 +282,7 @@ private async Task<object> CopyCollectionAsync(ICollection collection, IRouter r
throw new InvalidDataException(string.Format("Impossible to translate item {0} into STAC.", collection.Uri));
}

logger.Output(string.Format("Copy collection {0} from {1}", stacCollectionNode.Id, collection.Uri));
logger.LogInformation(string.Format("Copy collection {0} from {1}", stacCollectionNode.Id, collection.Uri));

// We update the destination in case a new router updated the route
IDestination destination = operationState.CurrentDestination.To(stacCollectionNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
"roles": [
"visual"
],
"title": "3-Band Visual",
"title": "3-Band Visual (L3)",
"href": "data/Flood_Mozambique-product/rasters/20220320_112827_SN20_L3_SR_MS_0.tif",
"eo:bands": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@
"roles": [
"visual"
],
"title": "3-Band Visual",
"title": "3-Band Visual (L3)",
"href": "data/Landslide_Storm_Hurricane_in_Mexico_6-product/rasters/20231030_200817_SN29_L3_SR_MS_0.tif",
"eo:bands": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
"roles": [
"visual"
],
"title": "3-Band Visual",
"title": "3-Band Visual (L3)",
"href": "data/20240314_172620_SN30_L1_SR/20240314_172620_SN30_L3_SR_MS_0.tif",
"eo:bands": [
{
Expand Down
Loading

0 comments on commit 85983a8

Please sign in to comment.