Skip to content

Commit

Permalink
Corrections for Vision-1 and related functionality (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
floeschau committed Mar 6, 2024
1 parent bb50fbd commit 765de21
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Stars.Data/Model/Metadata/Dimap/DimapMetadataExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,11 @@ protected void AddAssets(StacItem stacItem, IItem item, DimapProfiler dimapProfi

private KeyValuePair<string, StacAsset> CreateRasterAsset(StacItem stacItem, IAsset bandAsset, DimapProfiler dimapProfiler, t_Data_File dataFile, Schemas.DimapDocument dimap)
{
string mimeType = MimeTypes.GetMimeType(Path.GetFileName(bandAsset.Uri.ToString()));
StacAsset stacAsset = StacAsset.CreateDataAsset(stacItem, bandAsset.Uri, new ContentType(MimeTypes.GetMimeType(Path.GetFileName(bandAsset.Uri.ToString()))));
string mimeType;
Console.WriteLine("EXT = {0}", Path.GetExtension(bandAsset.Uri.AbsolutePath));
if (Path.GetExtension(bandAsset.Uri.AbsolutePath) == ".jp2") mimeType = "image/jpeg";
else mimeType = MimeTypes.GetMimeType(Path.GetFileName(bandAsset.Uri.AbsolutePath));
StacAsset stacAsset = StacAsset.CreateDataAsset(stacItem, bandAsset.Uri, new ContentType(mimeType));
stacAsset.Properties.AddRange(bandAsset.Properties);
stacAsset.Title = dimapProfiler.GetAssetTitle(bandAsset, dataFile, dimap);
return new KeyValuePair<string, StacAsset>(dimapProfiler.GetProductKey(bandAsset, dataFile), stacAsset);
Expand Down

0 comments on commit 765de21

Please sign in to comment.