Skip to content

Commit 6ad103b

Browse files
committed
Upgrade to STAC_VERSION 1.1.0
1 parent 44e5108 commit 6ad103b

File tree

7 files changed

+26
-22
lines changed

7 files changed

+26
-22
lines changed

app/resto/core/RestoCollection.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
* @OA\Property(
6767
* property="license",
6868
* type="string",
69-
* description="License for this collection as a SPDX License identifier. Alternatively, use proprietary if the license is not on the SPDX license list or various if multiple licenses apply. In these two cases links to the license texts SHOULD be added, see the license link relation type."
69+
* description="License for this collection as a SPDX License identifier. Alternatively, use other if the license is not on the SPDX license list. In these case link to the license texts SHOULD be added, see the license link relation type."
7070
* ),
7171
* @OA\Property(
7272
* property="links",
@@ -110,7 +110,7 @@
110110
* "version": "1.0",
111111
* "model": "OpticalModel",
112112
* "visibility": {"default"},
113-
* "license": "proprietary",
113+
* "license": "other",
114114
* "providers": {
115115
* {
116116
* "name": "European Union/ESA/Copernicus",
@@ -129,7 +129,7 @@
129129
* }
130130
* },
131131
* "summaries": {
132-
* "eo:bands": {
132+
* "bands": {
133133
* {
134134
* "name": "B1",
135135
* "common_name": "coastal",
@@ -250,8 +250,8 @@
250250
* @OA\Property(
251251
* property="license",
252252
* type="string",
253-
* enum={"proprietary", "various", "<license id>"},
254-
* description="License for this collection as a SPDX License identifier or expression. Alternatively, use proprietary if the license is not on the SPDX license list or various if multiple licenses apply. In these two cases links to the license texts SHOULD be added, see the license link relation type."
253+
* enum={"other", "<license id>"},
254+
* description="License for this collection as a SPDX License identifier or expression. Alternatively, use other if the license is not on the SPDX license list. In this case, links to the license texts SHOULD be added, see the license link relation type."
255255
* ),
256256
* @OA\Property(
257257
* property="extent",
@@ -342,7 +342,7 @@
342342
* "sentinel",
343343
* "sentinel2"
344344
* },
345-
* "license": "proprietary",
345+
* "license": "other",
346346
* "extent": {
347347
* "spatial": {
348348
* "bbox": {
@@ -419,7 +419,7 @@
419419
* "productType": {
420420
* "REFLECTANCE"
421421
* },
422-
* "eo:bands": {
422+
* "bands": {
423423
* {
424424
* "name": "B1",
425425
* "common_name": "coastal",

app/resto/core/RestoCollections.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,14 @@ public function toArray()
288288
'rel' => 'child',
289289
'type' => RestoUtil::$contentTypes['json'],
290290
'title' => $collection['title'],
291-
'description' => $collection['description'],
292291
'href' => $this->context->core['baseUrl'] . RestoUtil::replaceInTemplate(RestoRouter::ROUTE_TO_COLLECTION, array('collectionId' => $key)),
293292
'roles' => array('collection')
294293
);
294+
295+
if ( isset($collection['description']) ) {
296+
$link['description'] = $collection['description'];
297+
}
298+
295299
if ( $matched > 0 ) {
296300
$link['matched'] = $matched;
297301
}

app/resto/core/api/CollectionsAPI.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function __construct($context, $user)
100100
* "level1C",
101101
* "USGS"
102102
* },
103-
* "license": "proprietary",
103+
* "license": "other",
104104
* "extent": {
105105
* "spatial": {
106106
* "bbox": {

app/resto/core/api/STACAPI.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class STACAPI
183183
* "href": "https://landsat-pds.s3.amazonaws.com/c1/L8/171/002/LC08_L1TP_171002_20200616_20200616_01_RT/LC08_L1TP_171002_20200616_20200616_01_RT_B1.TIF",
184184
* "type": "image/tiff; application=geotiff; profile=cloud-optimized",
185185
* "roles":{"data"},
186-
* "eo:bands": {
186+
* "bands": {
187187
* 0
188188
* }
189189
* }
@@ -193,7 +193,7 @@ class STACAPI
193193
/*
194194
* STAC version
195195
*/
196-
const STAC_VERSION = '1.0.0';
196+
const STAC_VERSION = '1.1.0';
197197

198198
/*
199199
* STAC namespaces
@@ -211,12 +211,12 @@ class STACAPI
211211
'https://api.stacspec.org/v1.0.0/item-search#sort',
212212
'https://api.stacspec.org/v1.0.0-rc.3/item-search#filter',
213213

214-
'http://www.opengis.net/spec/ogcapi_common-2/1.0/conf/collections',
215-
216214
'https://api.stacspec.org/v1.0.0/ogcapi-features#fields',
217215
'https://api.stacspec.org/v1.0.0/ogcapi-features#sort',
218216
'https://api.stacspec.org/v1.0.0/ogcapi-features#filter',
219217

218+
'http://www.opengis.net/spec/ogcapi_common-2/1.0/conf/collections',
219+
220220
'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core',
221221
'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson',
222222
'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30',

docs/api/resto-api.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@
450450
"level1C",
451451
"USGS"
452452
],
453-
"license": "proprietary",
453+
"license": "other",
454454
"extent": {
455455
"spatial": {
456456
"bbox": [
@@ -4289,7 +4289,7 @@
42894289
"visibility": [
42904290
"default"
42914291
],
4292-
"license": "proprietary",
4292+
"license": "other",
42934293
"providers": [
42944294
{
42954295
"name": "European Union/ESA/Copernicus",
@@ -4308,7 +4308,7 @@
43084308
}
43094309
],
43104310
"summaries": {
4311-
"eo:bands": [
4311+
"bands": [
43124312
{
43134313
"name": "B1",
43144314
"common_name": "coastal",
@@ -4493,7 +4493,7 @@
44934493
"sentinel",
44944494
"sentinel2"
44954495
],
4496-
"license": "proprietary",
4496+
"license": "other",
44974497
"extent": {
44984498
"spatial": {
44994499
"bbox": [
@@ -4570,7 +4570,7 @@
45704570
"productType": [
45714571
"REFLECTANCE"
45724572
],
4573-
"eo:bands": [
4573+
"bands": [
45744574
{
45754575
"name": "B1",
45764576
"common_name": "coastal",
@@ -5717,7 +5717,7 @@
57175717
"roles": [
57185718
"data"
57195719
],
5720-
"eo:bands": [
5720+
"bands": [
57215721
0
57225722
]
57235723
}

examples/collections/L8.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
}
3939
],
4040
"summaries": {
41-
"eo:bands": [
41+
"bands": [
4242
{
4343
"name": "B1",
4444
"common_name": "coastal",

examples/collections/S2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
],
1515
"version": "1.0",
1616
"model": "OpticalModel",
17-
"license": "proprietary",
17+
"license": "other",
1818
"providers": [
1919
{
2020
"name": "European Union/ESA/Copernicus",
@@ -47,7 +47,7 @@
4747
}
4848
],
4949
"summaries": {
50-
"eo:bands": [
50+
"bands": [
5151
{
5252
"name": "B1",
5353
"common_name": "coastal",

0 commit comments

Comments
 (0)