Skip to content

Commit

Permalink
Merge branch 'release/1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed Jul 6, 2021
2 parents 1aac800 + 9ade323 commit 8f1f2d3
Show file tree
Hide file tree
Showing 35 changed files with 1,374 additions and 76 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

## [1.1.0](https://github.com/Terradue/DotNetStac/compare/1.0.0...1.1.0)
## [1.1.1](https://github.com/Terradue/DotNetStac/compare/1.1.0...1.1.1)

### Commits

- PropertyObservableCollection [`7fa3967`](https://github.com/Terradue/DotNetStac/commit/7fa39674a5f1661ca6b522cf32999aa57233b372)
- typed summaries [`2ee6d80`](https://github.com/Terradue/DotNetStac/commit/2ee6d8056fa326dc4e0898bfb9b35f2db66ba337)
- Init lock [`50b5add`](https://github.com/Terradue/DotNetStac/commit/50b5addccb604d3ba10e58db80110838168304c4)
- improved stac extension dlecaration [`9779206`](https://github.com/Terradue/DotNetStac/commit/9779206d65e67cbd470fe2c2278a228da56cb21e)
- lock object [`49dd275`](https://github.com/Terradue/DotNetStac/commit/49dd27539e696e1d34a0045e5ca05bf132ddf7e6)

## [1.1.0](https://github.com/Terradue/DotNetStac/compare/1.0.0...1.1.0) - 2021-06-22

### Merged

Expand All @@ -20,7 +30,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Create codeql-analysis.yml [`d3890fe`](https://github.com/Terradue/DotNetStac/commit/d3890fee3f829f1ea27e0e61d6cfffca80cacb68)
- do not load schema at extension load [`8b3884b`](https://github.com/Terradue/DotNetStac/commit/8b3884b0c7060e437950f98df7e951bca36a8a93)
- GetCollection [`d94457d`](https://github.com/Terradue/DotNetStac/commit/d94457da52d2084d2ce5ede79c9764d4243b8a71)
- more formatting [`77c0722`](https://github.com/Terradue/DotNetStac/commit/77c07227a2e1a8c983814c2206fb4f8e95618a71)
- removed profile [`b40f4e0`](https://github.com/Terradue/DotNetStac/commit/b40f4e0d967720296bb852aab6803214343d990b)
- moved in workflow folder [`baf822b`](https://github.com/Terradue/DotNetStac/commit/baf822be0cc188ce49f8a68735b7e8d0ea725313)
- cedeql [`ed83c03`](https://github.com/Terradue/DotNetStac/commit/ed83c0347ed2f5540b8e69606f4e4354d3b4f2fa)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

<h3 align="center">

![Build Status](https://github.com/Terradue/DotNetStac/actions/workflows/build.yaml/badge.svg?branch=release/1.1.0)
![Build Status](https://github.com/Terradue/DotNetStac/actions/workflows/build.yaml/badge.svg?branch=release/1.1.1)
[![NuGet](https://img.shields.io/nuget/vpre/DotNetStac)](https://www.nuget.org/packages/DotNetStac/)
[![codecov](https://codecov.io/gh/Terradue/DotNetStac/branch/release/1.1.0/graph/badge.svg)](https://codecov.io/gh/Terradue/DotNetStac)
[![codecov](https://codecov.io/gh/Terradue/DotNetStac/branch/release/1.1.1/graph/badge.svg)](https://codecov.io/gh/Terradue/DotNetStac)
[![Gitter](https://img.shields.io/gitter/room/SpatioTemporal-Asset-Catalog/Lobby?color=yellow)](https://gitter.im/SpatioTemporal-Asset-Catalog/Lobby)
[![License](https://img.shields.io/badge/license-AGPL3-blue.svg)](LICENSE)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Terradue/DotNetStac/master?filepath=example.ipynb)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"unreleased": false,
"commitLimit": false,
"hideEmptyReleases": true,
"ignoreCommitPattern": "^(.{0,5}|bump.*|ready.*|.*changelog.*)$",
"ignoreCommitPattern": "^(.{0,5}|bump.*|ready.*|.*changelog.*|.*formatting.*)$",
"releaseSummary": true
}
}
27 changes: 27 additions & 0 deletions src/DotNetStac.Test/Collection/CollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -258,5 +258,32 @@ public void CollectionClone()
JsonAssert.AreEqual(simpleJson, clonedJson);
}

[Fact]
public void UpdateCollection()
{
var collectionJson = GetJson("Collection", "CanDeserializeSentinel2Sample");

ValidateJson(collectionJson);

var collection = StacConvert.Deserialize<StacCollection>(collectionJson);

var itemJson = GetJson("Collection", "K3A_20200508102646_28267_00027320_L1G");

ValidateJson(itemJson);

var item = StacConvert.Deserialize<StacItem>(itemJson);

Dictionary<Uri, StacItem> items = new Dictionary<Uri, StacItem>();
items.Add(new Uri("http://test/test.json"), item);

collection.Update(items);

var actualJson = StacConvert.Serialize(collection);

var expectedJson = GetJson("Collection");

JsonAssert.AreEqual(expectedJson, actualJson);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public void CanDeserializeBaseCollectionExample()
public void CanCreateBaseCollectionExample()
{
var expectedJson = httpClient.GetStringAsync($"https://raw.githubusercontent.com/radiantearth/stac-spec/v{Versions.StacVersionList.Current}/examples/collection.json").GetAwaiter().GetResult();
//TMP
expectedJson = expectedJson.Replace("\"proj:epsg\": {\n \"minimum\": 32659,\n \"maximum\": 32659\n }", "\"proj:epsg\":[32659]");

ValidateJson(expectedJson);

Expand Down
20 changes: 20 additions & 0 deletions src/DotNetStac.Test/Item/ItemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,25 @@ public void ItemClone()

JsonAssert.AreEqual(simpleJson, expectedJson);
}

[Fact]
public void ItemProviders()
{
var simpleJson = GetJson("Item", "ItemProvidersIn");
ValidateJson(simpleJson);
StacItem simpleItem = StacConvert.Deserialize<StacItem>(simpleJson);

simpleItem.Providers.Add(new StacProvider("ESA", new StacProviderRole[] { StacProviderRole.licensor }));

Assert.Contains<string, object>("providers", simpleItem.Properties);

simpleItem.Providers.RemoveAt(0);

Assert.DoesNotContain<string, object>("providers", simpleItem.Properties);

var newJson = StacConvert.Serialize(simpleItem);
ValidateJson(newJson);

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
{
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json"
],
"stac_version": "1.0.0",
"links": [
{
"rel": "self",
"href": "K3A_20200508102646_28267_00027320_L1G.json"
}
],
"assets": {
"metadata": {
"type": "text/xml",
"roles": [
"metadata"
],
"href": "750-KARI-KOMPSAT3A-urn_ogc_def_EOP_KARI_KOMPSAT3_K3A_20200508102646_28267_00027320_L1G_Aux_xml.enclosure/K3A_20200508102646_28267_00027320_L1G_Aux.xml"
},
"MS1": {
"type": "image/tiff",
"roles": [
"data"
],
"href": "750-KARI-KOMPSAT3A-urn_ogc_def_EOP_KARI_KOMPSAT3_K3A_20200508102646_28267_00027320_L1G_Aux_xml.enclosure/K3A_20200508102646_28267_00027320_L1G_B.tif",
"gsd": 2.2,
"eo:bands": [
{
"name": "MS1",
"common_name": "blue",
"center_wavelength": 0.485,
"scale": 27.62430939226519,
"offset": -22.1416,
"solar_illumination": 2001.0
}
]
},
"overview": {
"type": "image/jpeg",
"roles": [
"overview"
],
"href": "750-KARI-KOMPSAT3A-urn_ogc_def_EOP_KARI_KOMPSAT3_K3A_20200508102646_28267_00027320_L1G_Aux_xml.enclosure/K3A_20200508102646_28267_00027320_L1G_br.jpg"
},
"MS2": {
"type": "image/tiff",
"roles": [
"data"
],
"href": "750-KARI-KOMPSAT3A-urn_ogc_def_EOP_KARI_KOMPSAT3_K3A_20200508102646_28267_00027320_L1G_Aux_xml.enclosure/K3A_20200508102646_28267_00027320_L1G_G.tif",
"gsd": 2.2,
"eo:bands": [
{
"name": "MS2",
"common_name": "green",
"center_wavelength": 0.56,
"scale": 40.16064257028113,
"offset": -14.021,
"solar_illumination": 1875.0
}
]
},
"MS4": {
"type": "image/tiff",
"roles": [
"data"
],
"href": "750-KARI-KOMPSAT3A-urn_ogc_def_EOP_KARI_KOMPSAT3_K3A_20200508102646_28267_00027320_L1G_Aux_xml.enclosure/K3A_20200508102646_28267_00027320_L1G_N.tif",
"gsd": 2.2,
"eo:bands": [
{
"name": "MS4",
"common_name": "nir",
"center_wavelength": 0.83,
"scale": 76.92307692307692,
"offset": -10.2834,
"solar_illumination": 1027.0
}
]
},
"PAN": {
"type": "image/tiff",
"roles": [
"data"
],
"href": "750-KARI-KOMPSAT3A-urn_ogc_def_EOP_KARI_KOMPSAT3_K3A_20200508102646_28267_00027320_L1G_Aux_xml.enclosure/K3A_20200508102646_28267_00027320_L1G_P.tif",
"gsd": 0.55,
"eo:bands": [
{
"name": "PAN",
"common_name": "pan",
"center_wavelength": 0.675
}
]
},
"MS3": {
"type": "image/tiff",
"roles": [
"data"
],
"href": "750-KARI-KOMPSAT3A-urn_ogc_def_EOP_KARI_KOMPSAT3_K3A_20200508102646_28267_00027320_L1G_Aux_xml.enclosure/K3A_20200508102646_28267_00027320_L1G_R.tif",
"gsd": 2.2,
"eo:bands": [
{
"name": "MS3",
"common_name": "red",
"center_wavelength": 0.66,
"scale": 43.66812227074236,
"offset": -13.0457,
"solar_illumination": 1525.0
}
]
},
"thumbnail": {
"type": "image/jpeg",
"roles": [
"thumbnail"
],
"href": "750-KARI-KOMPSAT3A-urn_ogc_def_EOP_KARI_KOMPSAT3_K3A_20200508102646_28267_00027320_L1G_Aux_xml.enclosure/K3A_20200508102646_28267_00027320_L1G_th.jpg"
}
},
"type": "Feature",
"id": "K3A_20200508102646_28267_00027320_L1G",
"bbox": [
45.1496484,
4.622519631,
45.289144731,
4.763075752
],
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
45.1496484,
4.622562804
],
[
45.219367822,
4.622544648
],
[
45.289086915,
4.622519631
],
[
45.289144731,
4.763031261
],
[
45.219411695,
4.763057041
],
[
45.149678329,
4.763075752
],
[
45.1496484,
4.622562804
]
]
]
},
"properties": {
"datetime": "2020-05-08T10:26:49.1019005+00:00",
"start_datetime": "2020-05-08T10:26:49.1019005+00:00",
"end_datetime": "2020-05-08T10:26:50.9661028+00:00",
"updated": "2020-09-30T06:17:41.7436478Z",
"platform": "kompsat-3a",
"constellation": "kompsat-3",
"mission": "kompsat-3",
"instruments": [
"aeiss-a"
],
"gsd": 0.55,
"title": "dummy",
"description": "dummy",
"eo:cloud_cover": 0.0,
"sat:absolute_orbit": 28267,
"proj:epsg": 32638,
"proj:wkt2": "PROJCS[\"WGS 84 / UTM zone 38N\", GEOGCS[\"WGS 84\", DATUM[\"World Geodetic System 1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563, AUTHORITY[\"EPSG\", \"7030\"]], AUTHORITY[\"EPSG\", \"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\", \"8901\"]], UNIT[\"degree\", 0.017453292519943295, AUTHORITY[\"EPSG\", \"9102\"]], AUTHORITY[\"EPSG\", \"4326\"]], UNIT[\"metre\", 1, AUTHORITY[\"EPSG\", \"9001\"]], PROJECTION[\"UTM38N\", AUTHORITY[\"EPSG\", \"32638\"]], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 45], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], AUTHORITY[\"EPSG\", \"32638\"], AXIS[\"East\", EAST], AXIS[\"North\", NORTH]]",
"view:off_nadir": 0.0,
"view:incidence_angle": 2.140217373,
"view:azimuth": 82.308110583,
"view:sun_azimuth": 300.8770745318308,
"view:sun_elevation": 64.28026701447693,
"proc:level": "Level1G",
"product_type": "PAN_MS_L1G"
}
}
Loading

0 comments on commit 8f1f2d3

Please sign in to comment.