Skip to content

Commit

Permalink
Merge branch 'develop' into TERRAPI-27
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed May 29, 2024
2 parents 5252c09 + 0d622ef commit 962c1c8
Show file tree
Hide file tree
Showing 7 changed files with 169 additions and 7 deletions.
22 changes: 20 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [2.22.6](https://github.com/Terradue/Stars/compare/2.22.5...2.22.6)
## [2.22.8](https://github.com/Terradue/Stars/compare/2.22.7...2.22.8)

this fixes MCUBE-10 and MCUBE-11
### Commits

- feat: Add VAPTest to StacItemToAtomItemTests.cs [`6764ce8`](https://github.com/Terradue/Stars/commit/6764ce8d40d303ca28386895f019ab626509ac09)
- Add asset key to syndication links in StarsAtomItem.cs [`5d4441f`](https://github.com/Terradue/Stars/commit/5d4441fb9172bbf1ad70d4d1639f40e776c26e86)

## [2.22.7](https://github.com/Terradue/Stars/compare/2.22.6...2.22.7) - 2024-05-23

### Merged

- Fix for wrongly assigned processing level in SAOCOM identifier [`#57`](https://github.com/Terradue/Stars/pull/57)
- Correction for incorrect Landsat-8/9 orbit states (orbit direction) [`#53`](https://github.com/Terradue/Stars/pull/53)

### Commits

- Fix for wrongly assigned processing level in identifier [`bcfb105`](https://github.com/Terradue/Stars/commit/bcfb10597097c586c5d4b282c72f032dd4aefa2e)
- Changed orbit direction calculation and added test case [`b9a4254`](https://github.com/Terradue/Stars/commit/b9a42543ce21d44d91992c406eb07229209a3544)
- Restored SAOCOM L1A expected output [`e3124fa`](https://github.com/Terradue/Stars/commit/e3124fa7971880c2c982d67904658a1499991568)

## [2.22.6](https://github.com/Terradue/Stars/compare/2.22.5...2.22.6) - 2024-05-21

### Commits

Expand Down
2 changes: 1 addition & 1 deletion src/Stars.Console/Terradue.Stars.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<Version>2.22.7</Version>
<Version>2.22.8</Version>
<!-- <VersionSuffix>beta.8</VersionSuffix> -->
<Description>Stars is a CLI for working with Spatio Temporal Catalog such as STAC but not only</Description>
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/file/v1.0.0/schema.json",
"https://stac-extensions.github.io/version/v1.0.0/schema.json",
"https://terradue.github.io/disaster/v1.0.0/schema.json"
],
"type": "Feature",
"id": "act-874-vap-1002-6",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
36.833,
-1.208
],
[
37.003,
-1.208
],
[
37.003,
-1.329
],
[
36.833,
-1.329
],
[
36.833,
-1.208
],
[
36.833,
-1.208
]
]
]
},
"properties": {
"disaster:class": "ValueAddedProduct",
"cpe:status": {
"stage": "notificationImported",
"message": "2 assets imported",
"link": "https://supervisor.disasterscharter.org/hangfire/jobs/details/34839"
},
"updated": "2024-05-23T09:33:59.0295601Z",
"disaster:activation_id": 874,
"cpe:cos2_id": "act-874-vap-1002-6",
"datetime": "2024-05-06T10:36:29Z",
"cpe:cos2_xml": "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<valueAddedProduct xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\n <identifier>1002-6</identifier>\n <activationId>874</activationId>\n <recordCreated>2024-05-07T02:38:19Z</recordCreated>\n <recordUpdated>2024-05-07T02:38:30Z</recordUpdated>\n <title language=\"en\">Flood impact analysis in Central Nairobi, Kenya as of 1 May 2024</title>\n <acquisitionDate>2024-05-06T10:36:29Z</acquisitionDate>\n <copyright language=\"en\">Includes Pleiades material © CNES (2024), Distribution Airbus DS.;Includes Pleiades material © CNES (2024), Distribution Airbus DS.;Includes Pleiades material © CNES (2024), Distribution Airbus DS.</copyright>\n <productFileUrl>https://disasterscharter.org/cos-api/service/vap/1002/6.pdf</productFileUrl>\n <quicklookFileUrl>https://disasterscharter.org/documents/10180/24551505/vap-1002-6-quicklook.jpg/96c86441-71dd-4774-9c66-2b66cbe3081a?version=1.0</quicklookFileUrl>\n <additionalInformation language=\"en\">This map illustrates satellite-detected surface waters in Nairobi, Kenya, as observed from a Pléiades image acquired on 1 May 2024 at 11:06 local time (08:06 UTC). Within the analyzed area, about 2 km² of land appears to be flooded. UNITAR-UNOSAT identified 3,387 affected structures, about 7 km of affected roads, and 9 affected bridges.\nThis is a preliminary analysis and has not yet been validated in the field. Please send ground feedback to the United Nations Satellite Centre (UNOSAT).</additionalInformation>\n <footprint>\n <polyPoint>\n <latitude>-1.208</latitude>\n <longitude>36.833</longitude>\n </polyPoint>\n <polyPoint>\n <latitude>-1.208</latitude>\n <longitude>37.003</longitude>\n </polyPoint>\n <polyPoint>\n <latitude>-1.329</latitude>\n <longitude>37.003</longitude>\n </polyPoint>\n <polyPoint>\n <latitude>-1.329</latitude>\n <longitude>36.833</longitude>\n </polyPoint>\n <polyPoint>\n <latitude>-1.208</latitude>\n <longitude>36.833</longitude>\n </polyPoint>\n </footprint>\n <productFileSize>0</productFileSize>\n</valueAddedProduct>",
"created": "2024-05-07T02:38:19Z",
"title": "Flood impact analysis in Central Nairobi, Kenya as of 1 May 2024 [05/06/2024 10:36:29]",
"source": null,
"copyright": "Includes Pleiades material © CNES (2024), Distribution Airbus DS.;Includes Pleiades material © CNES (2024), Distribution Airbus DS.;Includes Pleiades material © CNES (2024), Distribution Airbus DS.",
"additional_information": "This map illustrates satellite-detected surface waters in Nairobi, Kenya, as observed from a Pléiades image acquired on 1 May 2024 at 11:06 local time (08:06 UTC). Within the analyzed area, about 2 km² of land appears to be flooded. UNITAR-UNOSAT identified 3,387 affected structures, about 7 km of affected roads, and 9 affected bridges.\nThis is a preliminary analysis and has not yet been validated in the field. Please send ground feedback to the United Nations Satellite Centre (UNOSAT).",
"description": "Name | Value\n---- | -----\nSource | ****\nCopyright | **Includes Pleiades material © CNES (2024), Distribution Airbus DS.;Includes Pleiades material © CNES (2024), Distribution Airbus DS.;Includes Pleiades material © CNES (2024), Distribution Airbus DS.**\nAdditional Information | **This map illustrates satellite-detected surface waters in Nairobi, Kenya, as observed from a Pléiades image acquired on 1 May 2024 at 11:06 local time (08:06 UTC). Within the analyzed area, about 2 km² of land appears to be flooded. UNITAR-UNOSAT identified 3,387 affected structures, about 7 km of affected roads, and 9 affected bridges. This is a preliminary analysis and has not yet been validated in the field. Please send ground feedback to the United Nations Satellite Centre (UNOSAT).**\nAcquisition Date | **06/05/2024 10:36:29**\nCreated | **07/05/2024 02:38:19**\nUpdated | **07/05/2024 02:38:30**\n",
"cpe:notification_source": "cos2",
"cpe:notified": [
"2024-05-07T02:38:30.5503974Z"
],
"version": "1"
},
"bbox": [
36.833,
-1.329,
37.003,
-1.208
],
"assets": {
"overview": {
"type": "image/jpeg",
"roles": [
"overview"
],
"title": "Value Added Product Overview",
"href": "https://supervisor.disasterscharter.org/assets/activations/act-874/vaps/act-874-vap-1002-6/act-874-vap-1002-6.json?key=overview",
"file:size": 314027
},
"enclosure": {
"type": "application/pdf",
"roles": [
"data",
"visual"
],
"title": "Value Added Product Enclosure",
"href": "https://supervisor.disasterscharter.org/assets/activations/act-874/vaps/act-874-vap-1002-6/act-874-vap-1002-6.json?key=enclosure",
"file:size": 4687256
}
},
"links": [
{
"type": "application/geo+json",
"rel": "self",
"title": "Flood impact analysis in Central Nairobi, Kenya as of 1 May 2024 [05/06/2024 10:36:29]",
"href": "https://supervisor.disasterscharter.org/api/activations/act-874/vaps/act-874-vap-1002-6/items/act-874-vap-1002-6.json.json"
},
{
"type": "application/json",
"rel": "root",
"title": "Root Catalog",
"href": "https://supervisor.disasterscharter.org/api/catalog.json"
},
{
"rel": "collection",
"title": "collection",
"href": "https://supervisor.disasterscharter.org/api/activations/act-874/vaps/act-874-vap-1002-6.json"
}
],
"collection": "act-874-vap-1002-6"
}
27 changes: 27 additions & 0 deletions src/Stars.Data.Tests/Translators/StacItemToAtomItemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,33 @@ public async System.Threading.Tasks.Task S1A_IW_GRDH_1SDV_20220903T165054_202209

}

[Fact]
public async System.Threading.Tasks.Task VAPTest()
{
string json = GetJson("Translators");

StacItem stacItem = StacConvert.Deserialize<StacItem>(json);

StacItemToAtomItemTranslator stacItemToAtomItemTranslator = new StacItemToAtomItemTranslator(ServiceProvider);

StacItemNode stacItemNode = new StacItemNode(stacItem, new System.Uri("https://supervisor.disasterscharter.org/api/activations/act-874/vaps/act-874-vap-1002-6/items/act-874-vap-1002-6.json"));

AtomItemNode atomItemNode = await stacItemToAtomItemTranslator.TranslateAsync<AtomItemNode>(stacItemNode, CancellationToken.None);

// find browse link
var browseLink = atomItemNode.AtomItem.Links.FirstOrDefault(r => r.RelationshipType == "icon");

Assert.NotNull(browseLink);
Assert.True(browseLink.Uri.ToString() == "https://supervisor.disasterscharter.org/assets/activations/act-874/vaps/act-874-vap-1002-6/act-874-vap-1002-6.json?key=overview");
// Check that the asset reference is set in the link attributes
Assert.True(browseLink.AttributeExtensions.ContainsKey(new XmlQualifiedName("asset")));
Assert.True(browseLink.AttributeExtensions[new XmlQualifiedName("asset")].ToString() == "overview");

// Check that description is not in markdown
Assert.DoesNotContain("Value----", atomItemNode.AtomItem.Summary.Text);

}


}

Expand Down
9 changes: 7 additions & 2 deletions src/Stars.Data/Model/Atom/StarsAtomItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,16 @@ private static IEnumerable<SyndicationLink> GetFunctionalLinks(IDictionary<strin
List<SyndicationLink> links = new List<SyndicationLink>();

var overviews = assets.Where(a => a.Value.Roles.Contains("overview") || a.Value.Roles.Contains("thumbnail") || a.Value.Roles.Contains("legend"));
links.AddRange(overviews.Select(o => new SyndicationLink(GetAssetUri(stacObjectUri, o.Value),
foreach (var o in overviews)
{
var link = new SyndicationLink(GetAssetUri(stacObjectUri, o.Value),
GetRelationshipFromRoles(o.Value.Roles),
GetTitleFromRoles(o),
o.Value.MediaType.ToString(),
Convert.ToInt64(o.Value.FileExtension().Size))));
Convert.ToInt64(o.Value.FileExtension().Size));
link.AttributeExtensions.Add(new XmlQualifiedName("asset"), o.Key);
links.Add(link);
}

return links;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Stars.Data/Terradue.Stars.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ProjectName>Terradue.Stars.Data</ProjectName>
<Title>Terradue.Stars.Data</Title>
<Description>Collection of data Plugins for Terradue.Stars</Description>
<Version>2.22.7</Version>
<Version>2.22.8</Version>
<!-- <VersionSuffix>beta.8</VersionSuffix> -->
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
<NoWarn>NU1603</NoWarn>
Expand Down
2 changes: 1 addition & 1 deletion src/Stars.Services/Terradue.Stars.Services.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<Title>Terradue.Stars</Title>
<Description>Stars is a set of services for working with Spatio Temporal Catalog such as STAC but not only</Description>
<Version>2.22.7</Version>
<Version>2.22.8</Version>
<!-- <VersionSuffix>beta.8</VersionSuffix> -->
<Version Condition=" '$(VersionSuffix)' != '' ">$(Version)-$(VersionSuffix)</Version>
<AssemblyName>Terradue.Stars.Services</AssemblyName>
Expand Down

0 comments on commit 962c1c8

Please sign in to comment.