1
+ {
2
+ "$schema" : " http://json-schema.org/draft-07/schema#" ,
3
+ "$id" : " https://stac-extensions.github.io/projection/v2.0.0/schema.json" ,
4
+ "title" : " Projection Extension" ,
5
+ "description" : " STAC Projection Extension for STAC Items." ,
6
+ "$comment" : " This schema succeeds if the proj: fields are not used at all, please keep this in mind." ,
7
+ "oneOf" : [
8
+ {
9
+ "$comment" : " This is the schema for STAC Items." ,
10
+ "allOf" : [
11
+ {
12
+ "$ref" : " #/definitions/stac_extensions"
13
+ },
14
+ {
15
+ "type" : " object" ,
16
+ "required" : [
17
+ " type" ,
18
+ " properties" ,
19
+ " assets"
20
+ ],
21
+ "properties" : {
22
+ "type" : {
23
+ "const" : " Feature"
24
+ },
25
+ "properties" : {
26
+ "$ref" : " #/definitions/fields"
27
+ },
28
+ "assets" : {
29
+ "type" : " object" ,
30
+ "additionalProperties" : {
31
+ "$ref" : " #/definitions/fields"
32
+ }
33
+ }
34
+ }
35
+ }
36
+ ]
37
+ },
38
+ {
39
+ "$comment" : " This is the schema for STAC Collections." ,
40
+ "allOf" : [
41
+ {
42
+ "type" : " object" ,
43
+ "required" : [
44
+ " type"
45
+ ],
46
+ "properties" : {
47
+ "type" : {
48
+ "const" : " Collection"
49
+ },
50
+ "assets" : {
51
+ "type" : " object" ,
52
+ "additionalProperties" : {
53
+ "$ref" : " #/definitions/fields"
54
+ }
55
+ },
56
+ "item_assets" : {
57
+ "type" : " object" ,
58
+ "additionalProperties" : {
59
+ "$ref" : " #/definitions/fields"
60
+ }
61
+ }
62
+ }
63
+ },
64
+ {
65
+ "$ref" : " #/definitions/stac_extensions"
66
+ }
67
+ ]
68
+ }
69
+ ],
70
+ "definitions" : {
71
+ "stac_extensions" : {
72
+ "type" : " object" ,
73
+ "required" : [
74
+ " stac_extensions"
75
+ ],
76
+ "properties" : {
77
+ "stac_extensions" : {
78
+ "type" : " array" ,
79
+ "contains" : {
80
+ "const" : " https://stac-extensions.github.io/projection/v2.0.0/schema.json"
81
+ }
82
+ }
83
+ }
84
+ },
85
+ "fields" : {
86
+ "type" : " object" ,
87
+ "properties" : {
88
+ "proj:code" :{
89
+ "title" :" Projection code" ,
90
+ "type" :[
91
+ " string" ,
92
+ " null"
93
+ ]
94
+ },
95
+ "proj:wkt2" :{
96
+ "title" :" Coordinate Reference System in WKT2 format" ,
97
+ "type" :[
98
+ " string" ,
99
+ " null"
100
+ ]
101
+ },
102
+ "proj:projjson" : {
103
+ "title" :" Coordinate Reference System in PROJJSON format" ,
104
+ "oneOf" : [
105
+ {
106
+ "$ref" : " https://proj.org/schemas/v0.7/projjson.schema.json"
107
+ },
108
+ {
109
+ "type" : " null"
110
+ }
111
+ ]
112
+ },
113
+ "proj:geometry" :{
114
+ "$ref" : " https://geojson.org/schema/Geometry.json"
115
+ },
116
+ "proj:bbox" :{
117
+ "title" :" Extent" ,
118
+ "type" :" array" ,
119
+ "oneOf" : [
120
+ {
121
+ "minItems" :4 ,
122
+ "maxItems" :4
123
+ },
124
+ {
125
+ "minItems" :6 ,
126
+ "maxItems" :6
127
+ }
128
+ ],
129
+ "items" :{
130
+ "type" :" number"
131
+ }
132
+ },
133
+ "proj:centroid" :{
134
+ "title" :" Centroid" ,
135
+ "type" :" object" ,
136
+ "required" : [
137
+ " lat" ,
138
+ " lon"
139
+ ],
140
+ "properties" : {
141
+ "lat" : {
142
+ "type" : " number" ,
143
+ "minimum" : -90 ,
144
+ "maximum" : 90
145
+ },
146
+ "lon" : {
147
+ "type" : " number" ,
148
+ "minimum" : -180 ,
149
+ "maximum" : 180
150
+ }
151
+ }
152
+ },
153
+ "proj:shape" :{
154
+ "title" :" Shape" ,
155
+ "type" :" array" ,
156
+ "minItems" :2 ,
157
+ "maxItems" :2 ,
158
+ "items" :{
159
+ "type" :" integer"
160
+ }
161
+ },
162
+ "proj:transform" :{
163
+ "title" :" Transform" ,
164
+ "type" :" array" ,
165
+ "oneOf" : [
166
+ {
167
+ "minItems" :6 ,
168
+ "maxItems" :6
169
+ },
170
+ {
171
+ "minItems" :9 ,
172
+ "maxItems" :9
173
+ }
174
+ ],
175
+ "items" :{
176
+ "type" :" number"
177
+ }
178
+ }
179
+ },
180
+ "patternProperties" : {
181
+ "^(?!proj:)" : {}
182
+ },
183
+ "additionalProperties" : false
184
+ }
185
+ }
186
+ }
0 commit comments