Skip to content

Commit 28e9cd6

Browse files
committed
schemas: update to STAC 1.1.0
1 parent dc6506d commit 28e9cd6

File tree

18 files changed

+438
-285
lines changed

18 files changed

+438
-285
lines changed

cubedash/_stac.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
# These searches are much slower we're forced us to use ODC's own metadata table.
4444
DEFAULT_RETURN_FULL_ITEMS = True
4545

46-
STAC_VERSION = "1.0.0"
46+
STAC_VERSION = "1.1.0"
4747

4848
ItemLike = Union[pystac.Item, dict]
4949

integration_tests/schemas/schemas.stacspec.org/1.0.0/stac-spec/item-spec/json-schema/basics.json

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 7 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://schemas.stacspec.org/v1.0.0/catalog-spec/json-schema/catalog.json#",
3+
"$id": "https://schemas.stacspec.org/v1.1.0/catalog-spec/json-schema/catalog.json",
44
"title": "STAC Catalog Specification",
55
"description": "This object represents Catalogs in a SpatioTemporal Asset Catalog.",
66
"allOf": [
77
{
88
"$ref": "#/definitions/catalog"
9+
},
10+
{
11+
"$ref": "../../item-spec/json-schema/common.json"
912
}
1013
],
1114
"definitions": {
1215
"catalog": {
1316
"title": "STAC Catalog",
1417
"type": "object",
18+
"$comment": "title and description is validated through the common metadata.",
1519
"required": [
1620
"stac_version",
1721
"type",
@@ -23,7 +27,7 @@
2327
"stac_version": {
2428
"title": "STAC version",
2529
"type": "string",
26-
"const": "1.0.0"
30+
"const": "1.1.0"
2731
},
2832
"stac_extensions": {
2933
"title": "STAC extensions",
@@ -44,49 +48,8 @@
4448
"type": "string",
4549
"minLength": 1
4650
},
47-
"title": {
48-
"title": "Title",
49-
"type": "string"
50-
},
51-
"description": {
52-
"title": "Description",
53-
"type": "string",
54-
"minLength": 1
55-
},
5651
"links": {
57-
"title": "Links",
58-
"type": "array",
59-
"items": {
60-
"$ref": "#/definitions/link"
61-
}
62-
}
63-
}
64-
},
65-
"link": {
66-
"type": "object",
67-
"required": [
68-
"rel",
69-
"href"
70-
],
71-
"properties": {
72-
"href": {
73-
"title": "Link reference",
74-
"type": "string",
75-
"format": "iri-reference",
76-
"minLength": 1
77-
},
78-
"rel": {
79-
"title": "Link relation type",
80-
"type": "string",
81-
"minLength": 1
82-
},
83-
"type": {
84-
"title": "Link type",
85-
"type": "string"
86-
},
87-
"title": {
88-
"title": "Link title",
89-
"type": "string"
52+
"$ref": "../../item-spec/json-schema/item.json#/definitions/links"
9053
}
9154
}
9255
}
Lines changed: 59 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://schemas.stacspec.org/v1.0.0/collection-spec/json-schema/collection.json#",
3+
"$id": "https://schemas.stacspec.org/v1.1.0/collection-spec/json-schema/collection.json",
44
"title": "STAC Collection Specification",
55
"description": "This object represents Collections in a SpatioTemporal Asset Catalog.",
66
"allOf": [
77
{
88
"$ref": "#/definitions/collection"
9+
},
10+
{
11+
"$ref": "../../item-spec/json-schema/common.json"
912
}
1013
],
1114
"definitions": {
1215
"collection": {
1316
"title": "STAC Collection",
14-
"description": "These are the fields specific to a STAC Collection. All other fields are inherited from STAC Catalog.",
17+
"description": "These are the fields specific to a STAC Collection.",
1518
"type": "object",
19+
"$comment": "title, description, keywords, providers and license is validated through the common metadata.",
1620
"required": [
1721
"stac_version",
1822
"type",
@@ -26,7 +30,7 @@
2630
"stac_version": {
2731
"title": "STAC version",
2832
"type": "string",
29-
"const": "1.0.0"
33+
"const": "1.1.0"
3034
},
3135
"stac_extensions": {
3236
"title": "STAC extensions",
@@ -47,64 +51,6 @@
4751
"type": "string",
4852
"minLength": 1
4953
},
50-
"title": {
51-
"title": "Title",
52-
"type": "string"
53-
},
54-
"description": {
55-
"title": "Description",
56-
"type": "string",
57-
"minLength": 1
58-
},
59-
"keywords": {
60-
"title": "Keywords",
61-
"type": "array",
62-
"items": {
63-
"type": "string"
64-
}
65-
},
66-
"license": {
67-
"title": "Collection License Name",
68-
"type": "string",
69-
"pattern": "^[\\w\\-\\.\\+]+$"
70-
},
71-
"providers": {
72-
"type": "array",
73-
"items": {
74-
"type": "object",
75-
"required": [
76-
"name"
77-
],
78-
"properties": {
79-
"name": {
80-
"title": "Organization name",
81-
"type": "string"
82-
},
83-
"description": {
84-
"title": "Organization description",
85-
"type": "string"
86-
},
87-
"roles": {
88-
"title": "Organization roles",
89-
"type": "array",
90-
"items": {
91-
"type": "string",
92-
"enum": [
93-
"producer",
94-
"licensor",
95-
"processor",
96-
"host"
97-
]
98-
}
99-
},
100-
"url": {
101-
"title": "Organization homepage",
102-
"type": "string",
103-
"format": "iri"
104-
}
105-
}
106-
}
107-
},
10854
"extent": {
10955
"title": "Extents",
11056
"type": "object",
@@ -123,18 +69,26 @@
12369
"bbox": {
12470
"title": "Spatial extents",
12571
"type": "array",
126-
"minItems": 1,
72+
"oneOf": [
73+
{
74+
"minItems": 1,
75+
"maxItems": 1
76+
},
77+
{
78+
"minItems": 3
79+
}
80+
],
12781
"items": {
12882
"title": "Spatial extent",
12983
"type": "array",
13084
"oneOf": [
13185
{
132-
"minItems":4,
133-
"maxItems":4
86+
"minItems": 4,
87+
"maxItems": 4
13488
},
13589
{
136-
"minItems":6,
137-
"maxItems":6
90+
"minItems": 6,
91+
"maxItems": 6
13892
}
13993
],
14094
"items": {
@@ -177,46 +131,52 @@
177131
"assets": {
178132
"$ref": "../../item-spec/json-schema/item.json#/definitions/assets"
179133
},
180-
"links": {
181-
"title": "Links",
182-
"type": "array",
183-
"items": {
184-
"$ref": "#/definitions/link"
134+
"item_assets": {
135+
"additionalProperties": {
136+
"allOf": [
137+
{
138+
"type": "object",
139+
"minProperties": 2,
140+
"properties": {
141+
"href": {
142+
"title": "Disallow href",
143+
"not": {}
144+
},
145+
"title": {
146+
"title": "Asset title",
147+
"type": "string"
148+
},
149+
"description": {
150+
"title": "Asset description",
151+
"type": "string"
152+
},
153+
"type": {
154+
"title": "Asset type",
155+
"type": "string"
156+
},
157+
"roles": {
158+
"title": "Asset roles",
159+
"type": "array",
160+
"items": {
161+
"type": "string"
162+
}
163+
}
164+
}
165+
},
166+
{
167+
"$ref": "../../item-spec/json-schema/common.json"
168+
}
169+
]
185170
}
186171
},
172+
"links": {
173+
"$ref": "../../item-spec/json-schema/item.json#/definitions/links"
174+
},
187175
"summaries": {
188176
"$ref": "#/definitions/summaries"
189177
}
190178
}
191179
},
192-
"link": {
193-
"type": "object",
194-
"required": [
195-
"rel",
196-
"href"
197-
],
198-
"properties": {
199-
"href": {
200-
"title": "Link reference",
201-
"type": "string",
202-
"format": "iri-reference",
203-
"minLength": 1
204-
},
205-
"rel": {
206-
"title": "Link relation type",
207-
"type": "string",
208-
"minLength": 1
209-
},
210-
"type": {
211-
"title": "Link type",
212-
"type": "string"
213-
},
214-
"title": {
215-
"title": "Link title",
216-
"type": "string"
217-
}
218-
}
219-
},
220180
"summaries": {
221181
"type": "object",
222182
"additionalProperties": {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/bands.json",
4+
"title": "Bands Field",
5+
"type": "object",
6+
"properties": {
7+
"bands": {
8+
"type": "array",
9+
"items": {
10+
"type": "object",
11+
"properties": {
12+
"name": {
13+
"type": "string"
14+
}
15+
},
16+
"allOf": [
17+
{
18+
"$ref": "common.json"
19+
}
20+
]
21+
}
22+
}
23+
}
24+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/basics.json",
4+
"title": "Basic Descriptive Fields",
5+
"type": "object",
6+
"properties": {
7+
"title": {
8+
"title": "Title",
9+
"description": "A human-readable title describing the entity.",
10+
"type": "string"
11+
},
12+
"description": {
13+
"title": "Description",
14+
"description": "Detailed multi-line description to fully explain the entity.",
15+
"type": "string",
16+
"minLength": 1
17+
},
18+
"keywords": {
19+
"title": "Keywords",
20+
"description": "List of keywords describing the entity.",
21+
"type": "array",
22+
"items": {
23+
"type": "string"
24+
}
25+
},
26+
"roles": {
27+
"title": "Roles",
28+
"type": "array",
29+
"items": {
30+
"type": "string"
31+
}
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)