Skip to content

Commit bd490c4

Browse files
committed
update schemata, remove extension language
1 parent 44d0879 commit bd490c4

File tree

7 files changed

+150
-112
lines changed

7 files changed

+150
-112
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://schemas.stacspec.org/v1.0.0-beta.2/catalog-spec/json-schema/catalog.json#",
4+
"title": "Core STAC Catalog Fields Specification",
5+
"description": "This object represents the fields shared by Catalogs and Collections",
6+
"allOf": [
7+
{
8+
"$ref": "#/definitions/catalogCore"
9+
}
10+
],
11+
"definitions": {
12+
"catalogCore": {
13+
"title": "Catalog Core Fields",
14+
"type": "object",
15+
"required": [
16+
"stac_version",
17+
"id",
18+
"description",
19+
"links",
20+
],
21+
"properties": {
22+
"stac_version": {
23+
"title": "STAC version",
24+
"type": "string",
25+
"const": "1.0.0-beta.2"
26+
},
27+
"stac_extensions": {
28+
"title": "STAC extensions",
29+
"type": "array",
30+
"uniqueItems": true,
31+
"items": {
32+
"anyOf": [
33+
{
34+
"title": "Reference to a JSON Schema",
35+
"type": "string",
36+
"format": "iri"
37+
},
38+
{
39+
"title": "Reference to a core extension",
40+
"type": "string"
41+
}
42+
]
43+
}
44+
},
45+
"id": {
46+
"title": "Identifier",
47+
"type": "string"
48+
},
49+
"title": {
50+
"title": "Title",
51+
"type": "string"
52+
},
53+
"description": {
54+
"title": "Description",
55+
"type": "string"
56+
},
57+
"links": {
58+
"title": "Links",
59+
"type": "array",
60+
"items": {
61+
"$ref": "#/definitions/link"
62+
}
63+
},
64+
"summaries": {
65+
"$ref": "#/definitions/summaries"
66+
}
67+
}
68+
},
69+
"link": {
70+
"type": "object",
71+
"required": [
72+
"rel",
73+
"href"
74+
],
75+
"properties": {
76+
"href": {
77+
"title": "Link reference",
78+
"type": "string",
79+
"format": "iri-reference"
80+
},
81+
"rel": {
82+
"title": "Link relation type",
83+
"type": "string"
84+
},
85+
"type": {
86+
"title": "Link type",
87+
"type": "string"
88+
},
89+
"title": {
90+
"title": "Link title",
91+
"type": "string"
92+
}
93+
}
94+
},
95+
"summaries": {
96+
"type": "object",
97+
"additionalProperties": {
98+
"oneOf": [
99+
{
100+
"title": "Stats",
101+
"type": "object",
102+
"required": [
103+
"minimum",
104+
"maximum"
105+
],
106+
"properties": {
107+
"minimum": {
108+
"title": "Minimum value",
109+
"type": ["number", "string"]
110+
},
111+
"maximum": {
112+
"title": "Maximum value",
113+
"type": ["number", "string"]
114+
}
115+
}
116+
},
117+
{
118+
"title": "Set of values",
119+
"type": "array",
120+
"minItems": 1,
121+
"items": {
122+
"description": "Any data type could occur."
123+
}
124+
}
125+
]
126+
}
127+
}
128+
}
129+
}
130+

catalog-spec/json-schema/catalog.json

Lines changed: 6 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"title": "STAC Catalog Specification",
55
"description": "This object represents Catalogs in a SpatioTemporal Asset Catalog.",
66
"allOf": [
7+
{
8+
"$ref": "./catalog-core.json"
9+
},
710
{
811
"$ref": "#/definitions/catalog"
912
}
@@ -13,117 +16,14 @@
1316
"title": "Catalog",
1417
"type": "object",
1518
"required": [
16-
"stac_version",
17-
"id",
18-
"description",
19-
"links"
20-
],
21-
"properties": {
22-
"stac_version": {
23-
"title": "STAC version",
24-
"type": "string",
25-
"const": "1.0.0-beta.2"
26-
},
27-
"stac_extensions": {
28-
"title": "STAC extensions",
29-
"type": "array",
30-
"uniqueItems": true,
31-
"items": {
32-
"anyOf": [
33-
{
34-
"title": "Reference to a JSON Schema",
35-
"type": "string",
36-
"format": "iri"
37-
},
38-
{
39-
"title": "Reference to a core extension",
40-
"type": "string"
41-
}
42-
]
43-
}
44-
},
45-
"id": {
46-
"title": "Identifier",
47-
"type": "string"
48-
},
49-
"title": {
50-
"title": "Title",
51-
"type": "string"
52-
},
53-
"description": {
54-
"title": "Description",
55-
"type": "string"
56-
},
57-
"links": {
58-
"title": "Links",
59-
"type": "array",
60-
"items": {
61-
"$ref": "#/definitions/link"
62-
}
63-
},
64-
"summaries": {
65-
"$ref": "#/definitions/summaries"
66-
}
67-
}
68-
},
69-
"link": {
70-
"type": "object",
71-
"required": [
72-
"rel",
73-
"href"
19+
"type"
7420
],
7521
"properties": {
76-
"href": {
77-
"title": "Link reference",
78-
"type": "string",
79-
"format": "iri-reference"
80-
},
81-
"rel": {
82-
"title": "Link relation type",
83-
"type": "string"
84-
},
8522
"type": {
86-
"title": "Link type",
87-
"type": "string"
88-
},
89-
"title": {
90-
"title": "Link title",
91-
"type": "string"
23+
"title": "Type of STAC entityt",
24+
"const": "Catalog"
9225
}
9326
}
94-
},
95-
"summaries": {
96-
"type": "object",
97-
"additionalProperties": {
98-
"oneOf": [
99-
{
100-
"title": "Stats",
101-
"type": "object",
102-
"required": [
103-
"minimum",
104-
"maximum"
105-
],
106-
"properties": {
107-
"minimum": {
108-
"title": "Minimum value",
109-
"type": ["number", "string"]
110-
},
111-
"maximum": {
112-
"title": "Maximum value",
113-
"type": ["number", "string"]
114-
}
115-
}
116-
},
117-
{
118-
"title": "Set of values",
119-
"type": "array",
120-
"minItems": 1,
121-
"items": {
122-
"description": "Any data type could occur."
123-
}
124-
}
125-
]
126-
}
12727
}
12828
}
12929
}

collection-spec/collection-spec.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# STAC Collection Specification
22

33
The STAC Collection Specification defines a set of common fields to describe a group of Items that share properties and metadata. The
4-
Collection Specification extends the STAC [Catalog Specification](../catalog-spec/catalog-spec.md) with additional fields to
5-
describe the whole dataset and the included set of Items. It shares the same fields and therefore every Collection is also a valid Catalog. Collections can have both parent Catalogs and Collections and child Items, Catalogs and Collections.
4+
Collection Specification shares some fields with the STAC [Catalog Specification](../catalog-spec/catalog-spec.md) with additional fields to
5+
describe the whole dataset and the included set of Items. Collections can have both parent Catalogs and Collections and child Items, Catalogs and Collections.
66

77
A STAC Collection is represented in JSON format. Any JSON object that contains all the required fields is a valid STAC Collection and also a valid STAC Catalog.
88

99
STAC Collections are compatible with the [Collection](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html#example_4) JSON
10-
specified in [*OGC API - Features*](https://ogcapi.ogc.org/features/), but it is extended with additional fields.
10+
specified in [*OGC API - Features*](https://ogcapi.ogc.org/features/), but they are extended with additional fields.
1111

1212
* [Examples](../examples/):
1313
* Sentinel 2: A basic standalone example of a [Collection](../examples/collection-only/collection.json) without Items.
1414
* Simple Example: A [Collection](../examples/collection.json) that links to 3 example Items.
15-
* Extension Collection: An additional [Collection](../examples/extensions-Collection/Collection.json), which is used to highlight
15+
* Extension Collection: An additional [Collection](../examples/extensions-collection/collection.json), which is used to highlight
1616
various [extension](../extensions) functionality, but serves as another example.
17-
* [JSON Schema](json-schema/Collection.json)
17+
* [JSON Schema](json-schema/collection.json)
1818

1919
## Collection fields
2020

collection-spec/json-schema/collection.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "This object represents Collections in a SpatioTemporal Asset Catalog.",
66
"allOf": [
77
{
8-
"$ref": "../../catalog-spec/json-schema/catalog.json"
8+
"$ref": "../../catalog-spec/json-schema/catalog-core.json"
99
},
1010
{
1111
"$ref": "#/definitions/collection"
@@ -17,10 +17,15 @@
1717
"description": "These are the fields specific to a STAC Collection. All other fields are inherited from STAC Catalog.",
1818
"type": "object",
1919
"required": [
20+
"type",
2021
"license",
2122
"extent"
2223
],
2324
"properties": {
25+
"type": {
26+
"title": "Type of STAC entity",
27+
"const": "Collection"
28+
},
2429
"stac_extensions": {
2530
"title": "STAC extensions",
2631
"type": "array",

examples/collection-only/collection.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"type": "Collection",
23
"stac_version": "1.0.0-beta.2",
34
"stac_extensions": [],
45
"id": "sentinel-2",

examples/collection.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"id": "simple-collection",
3+
"type": "Collection",
34
"stac_version": "1.0.0-beta.2",
45
"description": "A simple collection demonstrating core catalog fields with links to a couple of items",
56
"title": "Simple Example Collection",

examples/extensions-collection/collection.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"id": "extensions-collection",
3+
"type": "Collection",
34
"stac_version": "1.0.0-beta.2",
45
"description": "A heterogenous collection containing deeper examples of various extensions",
56
"links": [

0 commit comments

Comments
 (0)