Skip to content

Commit

Permalink
stac 1.0.0!
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelmathot committed May 26, 2021
1 parent 934c3c3 commit e083b45
Show file tree
Hide file tree
Showing 39 changed files with 80 additions and 90 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"checksum",
"sar",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"checksum",
"sar",
Expand Down
2 changes: 1 addition & 1 deletion src/DotNetStac.Test/Collection/CollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void CanDeserializeSentinel2Sample()

Assert.NotNull(item.Summaries);

Assert.Equal("1.0.0-rc.4", item.StacVersion);
Assert.Equal("1.0.0", item.StacVersion);

Assert.Empty(item.StacExtensions);

Expand Down
22 changes: 5 additions & 17 deletions src/DotNetStac.Test/Collection/StacRepositoryCollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public void CanCreateBaseCollectionExample()
Dictionary<Uri, StacItem> items = new Dictionary<Uri, StacItem>();
Uri simpleItemUri = new Uri($"https://raw.githubusercontent.com/radiantearth/stac-spec/v{Versions.StacVersionList.Current}/examples/simple-item.json");
items.Add(simpleItemUri, StacConvert.Deserialize<StacItem>(httpClient.GetStringAsync(simpleItemUri).GetAwaiter().GetResult()));
items[simpleItemUri].Title = "Simple Item";
Uri coreItemUri = new Uri($"https://raw.githubusercontent.com/radiantearth/stac-spec/v{Versions.StacVersionList.Current}/examples/core-item.json");
string coreItemJson = httpClient.GetStringAsync(coreItemUri).GetAwaiter().GetResult();
coreItemJson = coreItemJson.Replace("cool_sat2", "cool_sat1");
Expand All @@ -55,25 +56,12 @@ public void CanCreateBaseCollectionExample()
"CC-BY-4.0",
new Uri($"https://raw.githubusercontent.com/radiantearth/stac-spec/v{Versions.StacVersionList.Current}/examples/collection.json"),
null);
// TEMPORARY overrides until #1080 is fixed
// collection.Extent.Spatial.BoundingBoxes[0] = new double[4] { 172.911, 1.343, 172.955, 1.3691 };
// collection.Extent.Temporal.Interval[0] = new DateTime?[2] { DateTime.Parse("2020-12-11T09:06:43.312000Z"), DateTime.Parse("2020-12-14T18:02:31.437000Z") };
expectedJson = expectedJson.Replace(",\n \"title\": \"Simple Item\"", "");
// expectedJson = expectedJson.Replace("\"https://stac-extensions.github.io/eo/v1.0.0/schema.json\"",
// "\"https://stac-extensions.github.io/eo/v1.0.0/schema.json\", \"https://stac-extensions.github.io/projection/v1.0.0/schema.json\"");
// expectedJson = expectedJson.Replace("rc.4", "rc.4", false, CultureInfo.CurrentCulture);
// expectedJson = expectedJson.Replace("cool_sensor_v1", "cool_sensor_v1\",\"cool_sensor_v2");
// expectedJson = expectedJson.Replace("\"cool_sat2\",\n \"cool_sat1\"\n","\"cool_sat1\",\n \"cool_sat2\"\n");
// expectedJson = expectedJson.Replace("minimum\": 0,\n \"maximum\": 15","maximum\": 3.8,\n \"minimum\": 3.8");
// expectedJson = expectedJson.Replace("minimum\": 6.78,\n \"maximum\": 40","maximum\": 135.7,\n \"minimum\": 135.7");
// expectedJson = expectedJson.Replace("sun_elevation","sun_azimuth");
// expectedJson = expectedJson.Replace("\"gsd\": {\n \"minimum\": 0.512,\n \"maximum\": 0.7\n }",
// "\"gsd\": {\n \"minimum\": 0.512,\n \"maximum\": 0.66\n },\n \"eo:cloud_cover\": {\n \"minimum\": 1.2,\n \"maximum\": 1.2\n },\n \"proj:epsg\": {\n \"minimum\": 32659,\n \"maximum\": 32659\n },\n \"view:sun_elevation\": {\n \"minimum\": 54.9,\n \"maximum\": 54.9\n }");
//

collection.Title = "Simple Example Collection";
collection.Links.Insert(0, StacLink.CreateRootLink(new Uri("./collection.json", UriKind.Relative), StacCollection.MEDIATYPE));
collection.Links.Insert(0, StacLink.CreateRootLink(new Uri("./collection.json", UriKind.Relative), StacCollection.MEDIATYPE, "Simple Example Collection"));
collection.Links.Add(StacLink.CreateSelfLink(new Uri($"https://raw.githubusercontent.com/radiantearth/stac-spec/v{Versions.StacVersionList.Current}/examples/collection.json"), StacCollection.MEDIATYPE));
collection.Providers.Add(new StacProvider("Remote Data, Inc"){
collection.Providers.Add(new StacProvider("Remote Data, Inc")
{
Description = "Producers of awesome spatiotemporal assets",
Uri = new Uri("http://remotedata.io")
});
Expand Down
2 changes: 1 addition & 1 deletion src/DotNetStac.Test/Extensions/ItemCollectionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void CanDeserializeResto()

ItemCollection itemCollection = stacObject as ItemCollection;

Assert.Equal("1.0.0-rc.4", itemCollection.StacVersion);
Assert.Equal("1.0.0", itemCollection.StacVersion);

Assert.NotEmpty(itemCollection.Features);

Expand Down
4 changes: 2 additions & 2 deletions src/DotNetStac.Test/Item/ItemTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void CanDeserializeMinimalSample()

Assert.NotNull(item.Properties);

Assert.Equal("1.0.0-rc.4", item.StacVersion);
Assert.Equal("1.0.0", item.StacVersion);

Assert.Empty(item.StacExtensions);

Expand Down Expand Up @@ -196,7 +196,7 @@ public void CanDeserializeS2CogSample()

Assert.NotNull(item.Properties);

Assert.Equal("1.0.0-rc.4", item.StacVersion);
Assert.Equal("1.0.0", item.StacVersion);

}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"id": "NAIP",
"type": "Catalog",
"description": "Catalog of NAIP Imagery",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"id": "NAIP",
"type": "Catalog",
"description": "Catalog of NAIP Imagery",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"type": "Collection",
"id": "COPERNICUS/S2",
"title": "Sentinel-2 MSI: MultiSpectral Instrument, Level-1C",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"type": "Collection",
"id": "COPERNICUS/S2",
"title": "Sentinel-2 MSI: MultiSpectral Instrument, Level-1C",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"type": "Feature",
"id": "CS3-20160503_132130_04",
"collection": "CS3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"type": "Feature",
"id": "CS3-20160503_132130_04",
"collection": "CS3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json"
],
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"links": [
{
"type": "application/json; profile=stac-item",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"type": "Feature",
"id": "CS3-20160503_132130_04",
"collection": "CS3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/file/v1.0.0/schema.json"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/file/v1.0.0/schema.json"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "FeatureCollection",
"id": "b083c1b2-75b9-59a0-bd76-ce0955f1467c",
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"context": {
"returned": 20,
"limit": 20,
Expand Down Expand Up @@ -357,7 +357,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -628,7 +628,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -980,7 +980,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -1347,7 +1347,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -1758,7 +1758,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -2105,7 +2105,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -2376,7 +2376,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -2717,7 +2717,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -3067,7 +3067,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -3421,7 +3421,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -3759,7 +3759,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -4097,7 +4097,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -4439,7 +4439,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -4793,7 +4793,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -5139,7 +5139,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -5489,7 +5489,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -5839,7 +5839,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -6173,7 +6173,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -6507,7 +6507,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down Expand Up @@ -6922,7 +6922,7 @@
]
}
},
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/sat/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"stac_extensions": [ "https://stac-extensions.github.io/eo/v1.0.0/schema.json" ],
"type": "Feature",
"id": "CS3-20160503_132130_04",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json"
],
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"links": [
{
"type": "application/json; profile=stac-item",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"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-rc.4",
"stac_version": "1.0.0",
"links": [
{
"rel": "self",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/view/v1.0.0/schema.json"
],
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"links": [
{
"rel": "self",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"stac_version": "1.0.0-rc.4",
"stac_version": "1.0.0",
"type": "Feature",
"id": "CS3-20160503_132130_04",
"collection": "CS3",
Expand Down
Loading

0 comments on commit e083b45

Please sign in to comment.