envlib-api 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. envlib_api/__init__.py +3 -0
  2. envlib_api/__main__.py +3 -0
  3. envlib_api/api/__init__.py +7 -0
  4. envlib_api/api/app.py +435 -0
  5. envlib_api/api/compress.py +52 -0
  6. envlib_api/api/cost.py +107 -0
  7. envlib_api/api/edr.py +343 -0
  8. envlib_api/api/encode.py +285 -0
  9. envlib_api/api/errors.py +23 -0
  10. envlib_api/api/grid.py +317 -0
  11. envlib_api/api/params.py +71 -0
  12. envlib_api/api/read.py +65 -0
  13. envlib_api/api/resolve.py +191 -0
  14. envlib_api/api/server.py +35 -0
  15. envlib_api/api/stations.py +96 -0
  16. envlib_api/api/timesel.py +97 -0
  17. envlib_api/cli.py +179 -0
  18. envlib_api/config.py +158 -0
  19. envlib_api/healthcheck.py +38 -0
  20. envlib_api/mirror.py +353 -0
  21. envlib_api/refresher.py +265 -0
  22. envlib_api/tests/__init__.py +0 -0
  23. envlib_api/tests/api_support.py +307 -0
  24. envlib_api/tests/conftest.py +12 -0
  25. envlib_api/tests/grid_support.py +217 -0
  26. envlib_api/tests/schemas/README.md +12 -0
  27. envlib_api/tests/schemas/coveragejson/coveragejson.json +1794 -0
  28. envlib_api/tests/schemas/edr/schemas/collections/DataQuery.yaml +38 -0
  29. envlib_api/tests/schemas/edr/schemas/collections/areaDataQuery.yaml +10 -0
  30. envlib_api/tests/schemas/edr/schemas/collections/areaLink.yaml +9 -0
  31. envlib_api/tests/schemas/edr/schemas/collections/collection.yaml +137 -0
  32. envlib_api/tests/schemas/edr/schemas/collections/collections.yaml +26 -0
  33. envlib_api/tests/schemas/edr/schemas/collections/corridorDataQuery.yaml +29 -0
  34. envlib_api/tests/schemas/edr/schemas/collections/corridorLink.yaml +9 -0
  35. envlib_api/tests/schemas/edr/schemas/collections/crsObject.yaml +15 -0
  36. envlib_api/tests/schemas/edr/schemas/collections/cubeDataQuery.yaml +20 -0
  37. envlib_api/tests/schemas/edr/schemas/collections/cubeLink.yaml +9 -0
  38. envlib_api/tests/schemas/edr/schemas/collections/extent.yaml +311 -0
  39. envlib_api/tests/schemas/edr/schemas/collections/instancesDataQuery.yaml +21 -0
  40. envlib_api/tests/schemas/edr/schemas/collections/instancesLink.yaml +9 -0
  41. envlib_api/tests/schemas/edr/schemas/collections/itemsDataQuery.yaml +21 -0
  42. envlib_api/tests/schemas/edr/schemas/collections/itemsLink.yaml +9 -0
  43. envlib_api/tests/schemas/edr/schemas/collections/locationsDataQuery.yaml +10 -0
  44. envlib_api/tests/schemas/edr/schemas/collections/locationsLink.yaml +9 -0
  45. envlib_api/tests/schemas/edr/schemas/collections/observedPropertyCollection.yaml +51 -0
  46. envlib_api/tests/schemas/edr/schemas/collections/parameterNames.yaml +70 -0
  47. envlib_api/tests/schemas/edr/schemas/collections/positionDataQuery.yaml +12 -0
  48. envlib_api/tests/schemas/edr/schemas/collections/positionLink.yaml +9 -0
  49. envlib_api/tests/schemas/edr/schemas/collections/radiusDataQuery.yaml +18 -0
  50. envlib_api/tests/schemas/edr/schemas/collections/radiusLink.yaml +9 -0
  51. envlib_api/tests/schemas/edr/schemas/collections/trajectoryDataQuery.yaml +10 -0
  52. envlib_api/tests/schemas/edr/schemas/collections/trajectoryLink.yaml +9 -0
  53. envlib_api/tests/schemas/edr/schemas/collections/units.yaml +42 -0
  54. envlib_api/tests/schemas/edr/schemas/core/confClasses.yaml +8 -0
  55. envlib_api/tests/schemas/edr/schemas/core/exception.yaml +8 -0
  56. envlib_api/tests/schemas/edr/schemas/core/landingPage.yaml +76 -0
  57. envlib_api/tests/schemas/edr/schemas/core/link.yaml +31 -0
  58. envlib_api/tests/schemas/edr/schemas/covjson/anyAxis.yaml +11 -0
  59. envlib_api/tests/schemas/edr/schemas/covjson/coverage.yaml +14 -0
  60. envlib_api/tests/schemas/edr/schemas/covjson/coverageBase.yaml +68 -0
  61. envlib_api/tests/schemas/edr/schemas/covjson/coverageCollection.yaml +58 -0
  62. envlib_api/tests/schemas/edr/schemas/covjson/coverageJSON.yaml +46 -0
  63. envlib_api/tests/schemas/edr/schemas/covjson/covjsonI18n.yaml +9 -0
  64. envlib_api/tests/schemas/edr/schemas/covjson/covjsonObservedProperty.yaml +29 -0
  65. envlib_api/tests/schemas/edr/schemas/covjson/covjsonParameter.yaml +32 -0
  66. envlib_api/tests/schemas/edr/schemas/covjson/covjsonParameterGroup.yaml +31 -0
  67. envlib_api/tests/schemas/edr/schemas/covjson/covjsonUnit.yaml +31 -0
  68. envlib_api/tests/schemas/edr/schemas/covjson/domain.yaml +7 -0
  69. envlib_api/tests/schemas/edr/schemas/covjson/domainBase.yaml +337 -0
  70. envlib_api/tests/schemas/edr/schemas/covjson/ndArray.yaml +88 -0
  71. envlib_api/tests/schemas/edr/schemas/covjson/numericAxis.yaml +11 -0
  72. envlib_api/tests/schemas/edr/schemas/covjson/numericRegularlySpacedAxis.yaml +17 -0
  73. envlib_api/tests/schemas/edr/schemas/covjson/numericSingleValueAxis.yaml +9 -0
  74. envlib_api/tests/schemas/edr/schemas/covjson/numericValuesAxis.yaml +14 -0
  75. envlib_api/tests/schemas/edr/schemas/covjson/polygonValuesAxis.yaml +29 -0
  76. envlib_api/tests/schemas/edr/schemas/covjson/primitiveValuesAxis.yaml +22 -0
  77. envlib_api/tests/schemas/edr/schemas/covjson/referenceSystem.yaml +48 -0
  78. envlib_api/tests/schemas/edr/schemas/covjson/referenceSystemConnection.yaml +16 -0
  79. envlib_api/tests/schemas/edr/schemas/covjson/stringSingleValueAxis.yaml +9 -0
  80. envlib_api/tests/schemas/edr/schemas/covjson/stringValuesAxis.yaml +14 -0
  81. envlib_api/tests/schemas/edr/schemas/covjson/targetConcept.yaml +13 -0
  82. envlib_api/tests/schemas/edr/schemas/covjson/tiledNdArray.yaml +50 -0
  83. envlib_api/tests/schemas/edr/schemas/covjson/tupleValuesAxis.yaml +24 -0
  84. envlib_api/tests/schemas/edr/schemas/covjson/valuesAxis.yaml +27 -0
  85. envlib_api/tests/schemas/edr/schemas/covjson/valuesAxisBase.yaml +24 -0
  86. envlib_api/tests/schemas/edr/schemas/edr-geojson/edrFeatureCollectionGeoJSON.yaml +32 -0
  87. envlib_api/tests/schemas/edr/schemas/edr-geojson/edrProperties.yaml +49 -0
  88. envlib_api/tests/schemas/edr/schemas/edr-geojson/observedProperty.yaml +26 -0
  89. envlib_api/tests/schemas/edr/schemas/edr-geojson/parameter.yaml +28 -0
  90. envlib_api/tests/schemas/edr/schemas/edr-geojson/unit.yaml +24 -0
  91. envlib_api/tests/schemas/edr/schemas/geojson/featureGeoJSON.yaml +29 -0
  92. envlib_api/tests/schemas/edr/schemas/geojson/geometrycollectionGeoJSON.yaml +19 -0
  93. envlib_api/tests/schemas/edr/schemas/geojson/linestringGeoJSON.yaml +23 -0
  94. envlib_api/tests/schemas/edr/schemas/geojson/multilinestringGeoJSON.yaml +19 -0
  95. envlib_api/tests/schemas/edr/schemas/geojson/multipointGeoJSON.yaml +16 -0
  96. envlib_api/tests/schemas/edr/schemas/geojson/multipolygonGeoJSON.yaml +21 -0
  97. envlib_api/tests/schemas/edr/schemas/geojson/pointGeoJSON.yaml +14 -0
  98. envlib_api/tests/schemas/edr/schemas/geojson/polygonGeoJSON.yaml +19 -0
  99. envlib_api/tests/schemas/edr/schemas/i18n.yaml +4 -0
  100. envlib_api/tests/schemas/edr/schemas/numberMatched.yaml +7 -0
  101. envlib_api/tests/schemas/edr/schemas/numberReturned.yaml +12 -0
  102. envlib_api/tests/schemas/edr/schemas/parameterGroup.yaml +30 -0
  103. envlib_api/tests/schemas/edr/schemas/queries/instances.yaml +26 -0
  104. envlib_api/tests/support.py +320 -0
  105. envlib_api/tests/test_alerting_and_guards.py +325 -0
  106. envlib_api/tests/test_api.py +808 -0
  107. envlib_api/tests/test_api_review.py +428 -0
  108. envlib_api/tests/test_grid.py +1075 -0
  109. envlib_api/tests/test_ops.py +358 -0
  110. envlib_api/tests/test_refresher.py +354 -0
  111. envlib_api/tests/test_schemas.py +91 -0
  112. envlib_api-0.3.0.dist-info/METADATA +408 -0
  113. envlib_api-0.3.0.dist-info/RECORD +116 -0
  114. envlib_api-0.3.0.dist-info/WHEEL +4 -0
  115. envlib_api-0.3.0.dist-info/entry_points.txt +3 -0
  116. envlib_api-0.3.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,1794 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.opengis.net/covjson/1.0/coveragejson.json",
4
+ "description": "A CoverageJSON object",
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "enum": [
9
+ "Domain",
10
+ "NdArray",
11
+ "TiledNdArray",
12
+ "Coverage",
13
+ "CoverageCollection"
14
+ ]
15
+ }
16
+ },
17
+ "required": [
18
+ "type"
19
+ ],
20
+ "allOf": [
21
+ {
22
+ "if": {
23
+ "properties": {
24
+ "type": {
25
+ "const": "Domain"
26
+ }
27
+ }
28
+ },
29
+ "then": {
30
+ "$ref": "#/$defs/domain"
31
+ }
32
+ },
33
+ {
34
+ "if": {
35
+ "properties": {
36
+ "type": {
37
+ "const": "NdArray"
38
+ }
39
+ }
40
+ },
41
+ "then": {
42
+ "$ref": "#/$defs/ndArray"
43
+ }
44
+ },
45
+ {
46
+ "if": {
47
+ "properties": {
48
+ "type": {
49
+ "const": "TiledNdArray"
50
+ }
51
+ }
52
+ },
53
+ "then": {
54
+ "$ref": "#/$defs/tiledNdArray"
55
+ }
56
+ },
57
+ {
58
+ "if": {
59
+ "properties": {
60
+ "type": {
61
+ "const": "Coverage"
62
+ }
63
+ }
64
+ },
65
+ "then": {
66
+ "$ref": "#/$defs/coverage"
67
+ }
68
+ },
69
+ {
70
+ "if": {
71
+ "properties": {
72
+ "type": {
73
+ "const": "CoverageCollection"
74
+ }
75
+ }
76
+ },
77
+ "then": {
78
+ "$ref": "#/$defs/coverageCollection"
79
+ }
80
+ }
81
+ ],
82
+ "$defs": {
83
+ "anyAxis": {
84
+ "description": "Validates any axis",
85
+ "if": {
86
+ "required": [
87
+ "values"
88
+ ]
89
+ },
90
+ "then": {
91
+ "$ref": "#/$defs/valuesAxis"
92
+ },
93
+ "else": {
94
+ "$ref": "#/$defs/numericRegularlySpacedAxis"
95
+ }
96
+ },
97
+ "coverage": {
98
+ "$ref": "#/$defs/coverageBase",
99
+ "required": [
100
+ "parameters"
101
+ ],
102
+ "properties": {
103
+ "domain": {
104
+ "if": {
105
+ "type": "object"
106
+ },
107
+ "then": {
108
+ "required": [
109
+ "referencing"
110
+ ]
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "coverageBase": {
116
+ "description": "A Coverage, representing a mapping from a domain to sets of data values described by parameters.",
117
+ "type": "object",
118
+ "properties": {
119
+ "type": {
120
+ "const": "Coverage"
121
+ },
122
+ "id": {
123
+ "type": "string"
124
+ },
125
+ "domainType": {
126
+ "type": "string"
127
+ },
128
+ "domain": {
129
+ "allOf": [
130
+ {
131
+ "type": [
132
+ "string",
133
+ "object"
134
+ ]
135
+ },
136
+ {
137
+ "if": {
138
+ "type": "object"
139
+ },
140
+ "then": {
141
+ "$ref": "#/$defs/domainBase"
142
+ }
143
+ }
144
+ ]
145
+ },
146
+ "parameters": {
147
+ "type": "object",
148
+ "patternProperties": {
149
+ ".+": {
150
+ "$ref": "#/$defs/parameter"
151
+ }
152
+ }
153
+ },
154
+ "parameterGroups": {
155
+ "type": "array",
156
+ "items": {
157
+ "$ref": "#/$defs/parameterGroup"
158
+ }
159
+ },
160
+ "ranges": {
161
+ "type": "object",
162
+ "patternProperties": {
163
+ ".+": {
164
+ "allOf": [
165
+ {
166
+ "type": [
167
+ "string",
168
+ "object"
169
+ ]
170
+ },
171
+ {
172
+ "if": {
173
+ "type": "object"
174
+ },
175
+ "then": {
176
+ "properties": {
177
+ "type": {
178
+ "enum": [
179
+ "NdArray",
180
+ "TiledNdArray"
181
+ ]
182
+ }
183
+ },
184
+ "required": [
185
+ "type"
186
+ ]
187
+ }
188
+ },
189
+ {
190
+ "if": {
191
+ "type": "object",
192
+ "properties": {
193
+ "type": {
194
+ "const": "NdArray"
195
+ }
196
+ }
197
+ },
198
+ "then": {
199
+ "$ref": "#/$defs/ndArray"
200
+ }
201
+ },
202
+ {
203
+ "if": {
204
+ "type": "object",
205
+ "properties": {
206
+ "type": {
207
+ "const": "TiledNdArray"
208
+ }
209
+ }
210
+ },
211
+ "then": {
212
+ "$ref": "#/$defs/tiledNdArray"
213
+ }
214
+ }
215
+ ]
216
+ }
217
+ }
218
+ },
219
+ "rangeAlternates": {
220
+ "type": "object"
221
+ }
222
+ },
223
+ "required": [
224
+ "type",
225
+ "domain",
226
+ "ranges"
227
+ ]
228
+ },
229
+ "coverageCollection": {
230
+ "description": "A collection of coverage objects",
231
+ "properties": {
232
+ "type": {
233
+ "const": "CoverageCollection"
234
+ },
235
+ "domainType": {
236
+ "type": "string"
237
+ },
238
+ "parameters": {
239
+ "type": "object",
240
+ "patternProperties": {
241
+ ".+": {
242
+ "$ref": "#/$defs/parameter"
243
+ }
244
+ }
245
+ },
246
+ "parameterGroups": {
247
+ "type": "array",
248
+ "items": {
249
+ "$ref": "#/$defs/parameterGroup"
250
+ }
251
+ },
252
+ "referencing": {
253
+ "type": "array",
254
+ "items": {
255
+ "$ref": "#/$defs/referenceSystemConnection"
256
+ }
257
+ },
258
+ "coverages": {
259
+ "type": "array",
260
+ "items": {
261
+ "$ref": "#/$defs/coverageBase"
262
+ }
263
+ }
264
+ },
265
+ "required": [
266
+ "type",
267
+ "coverages"
268
+ ],
269
+ "allOf": [
270
+ {
271
+ "$comment": "If no parameters are present at collection level then each coverage must have their own",
272
+ "if": {
273
+ "not": {
274
+ "required": [
275
+ "parameters"
276
+ ]
277
+ }
278
+ },
279
+ "then": {
280
+ "properties": {
281
+ "coverages": {
282
+ "items": {
283
+ "required": [
284
+ "parameters"
285
+ ]
286
+ }
287
+ }
288
+ }
289
+ }
290
+ },
291
+ {
292
+ "$comment": "If no \"referencing\" member is present at collection level then each coverage domain must have its own",
293
+ "if": {
294
+ "not": {
295
+ "required": [
296
+ "referencing"
297
+ ]
298
+ }
299
+ },
300
+ "then": {
301
+ "properties": {
302
+ "coverages": {
303
+ "items": {
304
+ "properties": {
305
+ "domain": {
306
+ "if": {
307
+ "type": "object"
308
+ },
309
+ "then": {
310
+ "required": [
311
+ "referencing"
312
+ ]
313
+ }
314
+ }
315
+ }
316
+ }
317
+ }
318
+ }
319
+ }
320
+ }
321
+ ]
322
+ },
323
+ "domain": {
324
+ "$ref": "#/$defs/domainBase",
325
+ "required": [
326
+ "referencing"
327
+ ]
328
+ },
329
+ "domainBase": {
330
+ "description": "A Domain, which defines a set of positions and their extent in one or more referencing systems",
331
+ "type": "object",
332
+ "properties": {
333
+ "type": {
334
+ "const": "Domain"
335
+ },
336
+ "domainType": {
337
+ "type": "string"
338
+ },
339
+ "axes": {
340
+ "type": "object",
341
+ "description": "Set of Axis objects, keyed by axis identifier",
342
+ "minProperties": 1,
343
+ "patternProperties": {
344
+ ".+": {
345
+ "$ref": "#/$defs/anyAxis"
346
+ }
347
+ }
348
+ },
349
+ "referencing": {
350
+ "type": "array",
351
+ "items": {
352
+ "$ref": "#/$defs/referenceSystemConnection"
353
+ }
354
+ }
355
+ },
356
+ "required": [
357
+ "type",
358
+ "axes"
359
+ ],
360
+ "dependentSchemas": {
361
+ "domainType": {
362
+ "allOf": [
363
+ {
364
+ "if": {
365
+ "properties": {
366
+ "domainType": {
367
+ "const": "Grid"
368
+ }
369
+ }
370
+ },
371
+ "then": {
372
+ "description": "Grid domain: x and y are required, z and t optional",
373
+ "properties": {
374
+ "axes": {
375
+ "properties": {
376
+ "x": {
377
+ "$ref": "#/$defs/numericAxis"
378
+ },
379
+ "y": {
380
+ "$ref": "#/$defs/numericAxis"
381
+ },
382
+ "z": {
383
+ "$ref": "#/$defs/numericAxis"
384
+ },
385
+ "t": {
386
+ "oneOf": [
387
+ {
388
+ "$ref": "#/$defs/numericAxis"
389
+ },
390
+ {
391
+ "$ref": "#/$defs/stringValuesAxis"
392
+ }
393
+ ]
394
+ }
395
+ },
396
+ "required": [
397
+ "x",
398
+ "y"
399
+ ],
400
+ "additionalProperties": false
401
+ }
402
+ }
403
+ }
404
+ },
405
+ {
406
+ "if": {
407
+ "properties": {
408
+ "domainType": {
409
+ "const": "Trajectory"
410
+ }
411
+ }
412
+ },
413
+ "then": {
414
+ "description": "Trajectory domain: mandatory composite axis and optional z axis",
415
+ "properties": {
416
+ "axes": {
417
+ "properties": {
418
+ "composite": {
419
+ "allOf": [
420
+ {
421
+ "$ref": "#/$defs/tupleValuesAxis"
422
+ },
423
+ {
424
+ "properties": {
425
+ "values": {
426
+ "items": {
427
+ "$comment": "In a Trajectory, tuples always have 3 (txy) or 4 (txyz) values",
428
+ "minItems": 3,
429
+ "maxItems": 4
430
+ }
431
+ },
432
+ "coordinates": {
433
+ "enum": [
434
+ [
435
+ "t",
436
+ "x",
437
+ "y",
438
+ "z"
439
+ ],
440
+ [
441
+ "t",
442
+ "x",
443
+ "y"
444
+ ]
445
+ ]
446
+ }
447
+ }
448
+ }
449
+ ]
450
+ },
451
+ "z": {
452
+ "$ref": "#/$defs/numericSingleValueAxis"
453
+ }
454
+ },
455
+ "required": [
456
+ "composite"
457
+ ],
458
+ "additionalProperties": false
459
+ }
460
+ }
461
+ }
462
+ },
463
+ {
464
+ "if": {
465
+ "properties": {
466
+ "domainType": {
467
+ "const": "VerticalProfile"
468
+ }
469
+ }
470
+ },
471
+ "then": {
472
+ "description": "Vertical Profile domain: mandatory x, y and z axis and optional t axis",
473
+ "properties": {
474
+ "axes": {
475
+ "properties": {
476
+ "x": {
477
+ "$ref": "#/$defs/numericSingleValueAxis"
478
+ },
479
+ "y": {
480
+ "$ref": "#/$defs/numericSingleValueAxis"
481
+ },
482
+ "z": {
483
+ "$ref": "#/$defs/numericAxis"
484
+ },
485
+ "t": {
486
+ "$ref": "#/$defs/stringSingleValueAxis"
487
+ }
488
+ },
489
+ "required": [
490
+ "x",
491
+ "y",
492
+ "z"
493
+ ],
494
+ "additionalProperties": false
495
+ }
496
+ }
497
+ }
498
+ },
499
+ {
500
+ "if": {
501
+ "properties": {
502
+ "domainType": {
503
+ "const": "Point"
504
+ }
505
+ }
506
+ },
507
+ "then": {
508
+ "description": "Point domain: mandatory x and y axis, optional z and t axis",
509
+ "properties": {
510
+ "axes": {
511
+ "properties": {
512
+ "x": {
513
+ "$ref": "#/$defs/numericSingleValueAxis"
514
+ },
515
+ "y": {
516
+ "$ref": "#/$defs/numericSingleValueAxis"
517
+ },
518
+ "z": {
519
+ "$ref": "#/$defs/numericSingleValueAxis"
520
+ },
521
+ "t": {
522
+ "$ref": "#/$defs/stringSingleValueAxis"
523
+ }
524
+ },
525
+ "required": [
526
+ "x",
527
+ "y"
528
+ ],
529
+ "additionalProperties": false
530
+ }
531
+ }
532
+ }
533
+ },
534
+ {
535
+ "if": {
536
+ "properties": {
537
+ "domainType": {
538
+ "const": "PointSeries"
539
+ }
540
+ }
541
+ },
542
+ "then": {
543
+ "description": "PointSeries domain: mandatory x, y and t axis, optional z axis",
544
+ "properties": {
545
+ "axes": {
546
+ "properties": {
547
+ "x": {
548
+ "$ref": "#/$defs/numericSingleValueAxis"
549
+ },
550
+ "y": {
551
+ "$ref": "#/$defs/numericSingleValueAxis"
552
+ },
553
+ "z": {
554
+ "$ref": "#/$defs/numericSingleValueAxis"
555
+ },
556
+ "t": {
557
+ "oneOf": [
558
+ {
559
+ "$ref": "#/$defs/numericAxis"
560
+ },
561
+ {
562
+ "$ref": "#/$defs/stringValuesAxis"
563
+ }
564
+ ]
565
+ }
566
+ },
567
+ "required": [
568
+ "x",
569
+ "y",
570
+ "t"
571
+ ],
572
+ "additionalProperties": false
573
+ }
574
+ }
575
+ }
576
+ },
577
+ {
578
+ "if": {
579
+ "properties": {
580
+ "domainType": {
581
+ "const": "MultiPoint"
582
+ }
583
+ }
584
+ },
585
+ "then": {
586
+ "description": "MultiPoint domain: mandatory composite axis, optional t axis",
587
+ "properties": {
588
+ "axes": {
589
+ "properties": {
590
+ "composite": {
591
+ "allOf": [
592
+ {
593
+ "$ref": "#/$defs/tupleValuesAxis"
594
+ },
595
+ {
596
+ "properties": {
597
+ "values": {
598
+ "items": {
599
+ "$comment": "In a MultiPoint, tuples always have 2 (xy) or 3 values (xyz)",
600
+ "minItems": 2,
601
+ "maxItems": 3
602
+ }
603
+ },
604
+ "coordinates": {
605
+ "enum": [
606
+ [
607
+ "x",
608
+ "y",
609
+ "z"
610
+ ],
611
+ [
612
+ "x",
613
+ "y"
614
+ ]
615
+ ]
616
+ }
617
+ }
618
+ }
619
+ ]
620
+ },
621
+ "t": {
622
+ "$ref": "#/$defs/stringSingleValueAxis"
623
+ }
624
+ },
625
+ "required": [
626
+ "composite"
627
+ ],
628
+ "additionalProperties": false
629
+ }
630
+ }
631
+ }
632
+ },
633
+ {
634
+ "if": {
635
+ "properties": {
636
+ "domainType": {
637
+ "const": "MultiPointSeries"
638
+ }
639
+ }
640
+ },
641
+ "then": {
642
+ "description": "MultiPointSeries domain: mandatory composite and t axes",
643
+ "properties": {
644
+ "axes": {
645
+ "properties": {
646
+ "composite": {
647
+ "allOf": [
648
+ {
649
+ "$ref": "#/$defs/tupleValuesAxis"
650
+ },
651
+ {
652
+ "properties": {
653
+ "values": {
654
+ "items": {
655
+ "$comment": "In a MultiPointSeries, tuples always have 2 (xy) or 3 values (xyz)",
656
+ "minItems": 2,
657
+ "maxItems": 3
658
+ }
659
+ },
660
+ "coordinates": {
661
+ "enum": [
662
+ [
663
+ "x",
664
+ "y",
665
+ "z"
666
+ ],
667
+ [
668
+ "x",
669
+ "y"
670
+ ]
671
+ ]
672
+ }
673
+ }
674
+ }
675
+ ]
676
+ },
677
+ "t": {
678
+ "oneOf": [
679
+ {
680
+ "$ref": "#/$defs/numericAxis"
681
+ },
682
+ {
683
+ "$ref": "#/$defs/stringValuesAxis"
684
+ }
685
+ ]
686
+ }
687
+ },
688
+ "required": [
689
+ "composite",
690
+ "t"
691
+ ],
692
+ "additionalProperties": false
693
+ }
694
+ }
695
+ }
696
+ },
697
+ {
698
+ "if": {
699
+ "properties": {
700
+ "domainType": {
701
+ "const": "Section"
702
+ }
703
+ }
704
+ },
705
+ "then": {
706
+ "description": "Section domain: mandatory composite and z axes",
707
+ "properties": {
708
+ "axes": {
709
+ "properties": {
710
+ "composite": {
711
+ "allOf": [
712
+ {
713
+ "$ref": "#/$defs/tupleValuesAxis"
714
+ },
715
+ {
716
+ "properties": {
717
+ "values": {
718
+ "items": {
719
+ "$comment": "In a Section, tuples always have 3 values (txy)",
720
+ "minItems": 3,
721
+ "maxItems": 3
722
+ }
723
+ },
724
+ "coordinates": {
725
+ "const": [
726
+ "t",
727
+ "x",
728
+ "y"
729
+ ]
730
+ }
731
+ }
732
+ }
733
+ ]
734
+ },
735
+ "z": {
736
+ "$ref": "#/$defs/numericAxis"
737
+ }
738
+ },
739
+ "required": [
740
+ "composite",
741
+ "z"
742
+ ],
743
+ "additionalProperties": false
744
+ }
745
+ }
746
+ }
747
+ },
748
+ {
749
+ "if": {
750
+ "properties": {
751
+ "domainType": {
752
+ "const": "Polygon"
753
+ }
754
+ }
755
+ },
756
+ "then": {
757
+ "description": "Polygon domain: mandatory composite axis, optional z and t axes",
758
+ "properties": {
759
+ "axes": {
760
+ "properties": {
761
+ "composite": {
762
+ "allOf": [
763
+ {
764
+ "$ref": "#/$defs/polygonValuesAxis"
765
+ },
766
+ {
767
+ "properties": {
768
+ "values": {
769
+ "$comment": "There can only be one polygon in the axis",
770
+ "maxItems": 1
771
+ },
772
+ "coordinates": {
773
+ "const": [
774
+ "x",
775
+ "y"
776
+ ]
777
+ }
778
+ }
779
+ }
780
+ ]
781
+ },
782
+ "z": {
783
+ "$ref": "#/$defs/numericSingleValueAxis"
784
+ },
785
+ "t": {
786
+ "$ref": "#/$defs/stringSingleValueAxis"
787
+ }
788
+ },
789
+ "required": [
790
+ "composite"
791
+ ],
792
+ "additionalProperties": false
793
+ }
794
+ }
795
+ }
796
+ },
797
+ {
798
+ "if": {
799
+ "properties": {
800
+ "domainType": {
801
+ "const": "PolygonSeries"
802
+ }
803
+ }
804
+ },
805
+ "then": {
806
+ "description": "PolygonSeries domain: mandatory composite axis, optional z and t axes",
807
+ "properties": {
808
+ "axes": {
809
+ "properties": {
810
+ "composite": {
811
+ "allOf": [
812
+ {
813
+ "$ref": "#/$defs/polygonValuesAxis"
814
+ },
815
+ {
816
+ "properties": {
817
+ "values": {
818
+ "$comment": "There can only be one polygon in the axis",
819
+ "maxItems": 1
820
+ },
821
+ "coordinates": {
822
+ "const": [
823
+ "x",
824
+ "y"
825
+ ]
826
+ }
827
+ }
828
+ }
829
+ ]
830
+ },
831
+ "z": {
832
+ "$ref": "#/$defs/numericSingleValueAxis"
833
+ },
834
+ "t": {
835
+ "oneOf": [
836
+ {
837
+ "$ref": "#/$defs/numericAxis"
838
+ },
839
+ {
840
+ "$ref": "#/$defs/stringValuesAxis"
841
+ }
842
+ ]
843
+ }
844
+ },
845
+ "required": [
846
+ "composite"
847
+ ],
848
+ "additionalProperties": false
849
+ }
850
+ }
851
+ }
852
+ },
853
+ {
854
+ "if": {
855
+ "properties": {
856
+ "domainType": {
857
+ "const": "MultiPolygon"
858
+ }
859
+ }
860
+ },
861
+ "then": {
862
+ "description": "MultiPolygon domain: mandatory composite axis, optional z and t axes",
863
+ "properties": {
864
+ "axes": {
865
+ "properties": {
866
+ "composite": {
867
+ "allOf": [
868
+ {
869
+ "$ref": "#/$defs/polygonValuesAxis"
870
+ },
871
+ {
872
+ "properties": {
873
+ "coordinates": {
874
+ "const": [
875
+ "x",
876
+ "y"
877
+ ]
878
+ }
879
+ }
880
+ }
881
+ ]
882
+ },
883
+ "z": {
884
+ "$ref": "#/$defs/numericSingleValueAxis"
885
+ },
886
+ "t": {
887
+ "$ref": "#/$defs/stringSingleValueAxis"
888
+ }
889
+ },
890
+ "required": [
891
+ "composite"
892
+ ],
893
+ "additionalProperties": false
894
+ }
895
+ }
896
+ }
897
+ },
898
+ {
899
+ "if": {
900
+ "properties": {
901
+ "domainType": {
902
+ "const": "MultiPolygonSeries"
903
+ }
904
+ }
905
+ },
906
+ "then": {
907
+ "description": "MultiPolygonSeries domain: mandatory composite axis, optional z and t axes",
908
+ "properties": {
909
+ "axes": {
910
+ "properties": {
911
+ "composite": {
912
+ "allOf": [
913
+ {
914
+ "$ref": "#/$defs/polygonValuesAxis"
915
+ },
916
+ {
917
+ "properties": {
918
+ "coordinates": {
919
+ "const": [
920
+ "x",
921
+ "y"
922
+ ]
923
+ }
924
+ }
925
+ }
926
+ ]
927
+ },
928
+ "z": {
929
+ "$ref": "#/$defs/numericSingleValueAxis"
930
+ },
931
+ "t": {
932
+ "oneOf": [
933
+ {
934
+ "$ref": "#/$defs/numericAxis"
935
+ },
936
+ {
937
+ "$ref": "#/$defs/stringValuesAxis"
938
+ }
939
+ ]
940
+ }
941
+ },
942
+ "required": [
943
+ "composite"
944
+ ],
945
+ "additionalProperties": false
946
+ }
947
+ }
948
+ }
949
+ }
950
+ ]
951
+ }
952
+ }
953
+ },
954
+ "i18n": {
955
+ "type": "object",
956
+ "description": "Object representing an internationalised string where keys are BCP 47 language tags.",
957
+ "patternProperties": {
958
+ "^(((([A-Za-z]{2,3}(-([A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-([A-Za-z]{4}))?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-([0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*))$": {
959
+ "type": "string"
960
+ }
961
+ },
962
+ "additionalProperties": false
963
+ },
964
+ "ndArray": {
965
+ "type": "object",
966
+ "description": "Object representing a multidimensional (>= 0D) array with named axes, encoded as a flat one-dimensional array in row-major order",
967
+ "properties": {
968
+ "type": {
969
+ "const": "NdArray"
970
+ },
971
+ "dataType": {
972
+ "enum": [
973
+ "float",
974
+ "integer",
975
+ "string"
976
+ ]
977
+ },
978
+ "shape": {
979
+ "type": "array",
980
+ "items": {
981
+ "type": "number"
982
+ }
983
+ },
984
+ "axisNames": {
985
+ "type": "array",
986
+ "items": {
987
+ "type": "string"
988
+ },
989
+ "uniqueItems": true
990
+ },
991
+ "values": {
992
+ "type": "array",
993
+ "minItems": 1
994
+ }
995
+ },
996
+ "allOf": [
997
+ {
998
+ "if": {
999
+ "properties": {
1000
+ "dataType": {
1001
+ "const": "float"
1002
+ }
1003
+ }
1004
+ },
1005
+ "then": {
1006
+ "properties": {
1007
+ "values": {
1008
+ "items": {
1009
+ "type": [
1010
+ "number",
1011
+ "null"
1012
+ ]
1013
+ }
1014
+ }
1015
+ }
1016
+ }
1017
+ },
1018
+ {
1019
+ "if": {
1020
+ "properties": {
1021
+ "dataType": {
1022
+ "const": "integer"
1023
+ }
1024
+ }
1025
+ },
1026
+ "then": {
1027
+ "properties": {
1028
+ "values": {
1029
+ "items": {
1030
+ "type": [
1031
+ "integer",
1032
+ "null"
1033
+ ]
1034
+ }
1035
+ }
1036
+ }
1037
+ }
1038
+ },
1039
+ {
1040
+ "if": {
1041
+ "properties": {
1042
+ "dataType": {
1043
+ "const": "string"
1044
+ }
1045
+ }
1046
+ },
1047
+ "then": {
1048
+ "properties": {
1049
+ "values": {
1050
+ "items": {
1051
+ "type": [
1052
+ "string",
1053
+ "null"
1054
+ ]
1055
+ }
1056
+ }
1057
+ }
1058
+ }
1059
+ },
1060
+ {
1061
+ "if": {
1062
+ "anyOf": [
1063
+ {
1064
+ "properties": {
1065
+ "values": {
1066
+ "minItems": 2
1067
+ }
1068
+ }
1069
+ },
1070
+ {
1071
+ "properties": {
1072
+ "shape": {
1073
+ "minItems": 1
1074
+ }
1075
+ },
1076
+ "required": [
1077
+ "shape"
1078
+ ]
1079
+ },
1080
+ {
1081
+ "properties": {
1082
+ "axisNames": {
1083
+ "minItems": 1
1084
+ }
1085
+ },
1086
+ "required": [
1087
+ "axisNames"
1088
+ ]
1089
+ }
1090
+ ]
1091
+ },
1092
+ "then": {
1093
+ "properties": {
1094
+ "shape": {
1095
+ "minItems": 1
1096
+ },
1097
+ "axisNames": {
1098
+ "minItems": 1
1099
+ }
1100
+ },
1101
+ "required": [
1102
+ "shape",
1103
+ "axisNames"
1104
+ ]
1105
+ }
1106
+ }
1107
+ ],
1108
+ "required": [
1109
+ "type",
1110
+ "dataType",
1111
+ "values"
1112
+ ]
1113
+ },
1114
+ "numericAxis": {
1115
+ "description": "Simple axis with numeric values",
1116
+ "if": {
1117
+ "required": [
1118
+ "values"
1119
+ ]
1120
+ },
1121
+ "then": {
1122
+ "$ref": "#/$defs/numericValuesAxis"
1123
+ },
1124
+ "else": {
1125
+ "$ref": "#/$defs/numericRegularlySpacedAxis"
1126
+ }
1127
+ },
1128
+ "numericRegularlySpacedAxis": {
1129
+ "description": "A regularly-spaced numeric axis",
1130
+ "properties": {
1131
+ "start": {
1132
+ "type": "number"
1133
+ },
1134
+ "stop": {
1135
+ "type": "number"
1136
+ },
1137
+ "num": {
1138
+ "type": "integer",
1139
+ "minimum": 1
1140
+ }
1141
+ },
1142
+ "required": [
1143
+ "start",
1144
+ "stop",
1145
+ "num"
1146
+ ],
1147
+ "additionalProperties": false
1148
+ },
1149
+ "numericSingleValueAxis": {
1150
+ "description": "Axis defined by single numeric value",
1151
+ "allOf": [
1152
+ {
1153
+ "$ref": "#/$defs/numericValuesAxis"
1154
+ },
1155
+ {
1156
+ "properties": {
1157
+ "values": {
1158
+ "maxItems": 1
1159
+ }
1160
+ }
1161
+ }
1162
+ ]
1163
+ },
1164
+ "numericValuesAxis": {
1165
+ "description": "Axis defined by list of numeric axis values and optional bounds",
1166
+ "allOf": [
1167
+ {
1168
+ "$ref": "#/$defs/valuesAxisBase"
1169
+ },
1170
+ {
1171
+ "properties": {
1172
+ "values": {
1173
+ "items": {
1174
+ "type": "number"
1175
+ }
1176
+ },
1177
+ "bounds": {
1178
+ "items": {
1179
+ "type": "number"
1180
+ }
1181
+ }
1182
+ },
1183
+ "additionalProperties": false
1184
+ }
1185
+ ]
1186
+ },
1187
+ "observedProperty": {
1188
+ "type": "object",
1189
+ "description": "A definition of the quantity being measured.",
1190
+ "properties": {
1191
+ "id": {
1192
+ "type": "string"
1193
+ },
1194
+ "label": {
1195
+ "$ref": "#/$defs/i18n"
1196
+ },
1197
+ "description": {
1198
+ "$ref": "#/$defs/i18n"
1199
+ },
1200
+ "categories": {
1201
+ "type": "array",
1202
+ "items": {
1203
+ "type": "object",
1204
+ "properties": {
1205
+ "id": {
1206
+ "type": "string"
1207
+ },
1208
+ "label": {
1209
+ "$ref": "#/$defs/i18n"
1210
+ },
1211
+ "description": {
1212
+ "$ref": "#/$defs/i18n"
1213
+ }
1214
+ },
1215
+ "required": [
1216
+ "id",
1217
+ "label"
1218
+ ]
1219
+ },
1220
+ "minItems": 1
1221
+ }
1222
+ },
1223
+ "required": [
1224
+ "label"
1225
+ ]
1226
+ },
1227
+ "parameter": {
1228
+ "type": "object",
1229
+ "description": "Represents metadata about the values of the coverage",
1230
+ "properties": {
1231
+ "id": {
1232
+ "type": "string"
1233
+ },
1234
+ "type": {
1235
+ "description": "Type of the parameter object, must be \"Parameter\"",
1236
+ "const": "Parameter"
1237
+ },
1238
+ "description": {
1239
+ "$ref": "#/$defs/i18n"
1240
+ },
1241
+ "observedProperty": {
1242
+ "$ref": "#/$defs/observedProperty"
1243
+ },
1244
+ "unit": {
1245
+ "$ref": "#/$defs/unit"
1246
+ },
1247
+ "categoryEncoding": {
1248
+ "type": "object",
1249
+ "description": "Maps IDs of categories in the observedProperty to range values",
1250
+ "patternProperties": {
1251
+ ".+": {
1252
+ "oneOf": [
1253
+ {
1254
+ "type": "integer"
1255
+ },
1256
+ {
1257
+ "type": "array",
1258
+ "items": {
1259
+ "type": "integer"
1260
+ },
1261
+ "minItems": 1,
1262
+ "uniqueItems": true
1263
+ }
1264
+ ]
1265
+ }
1266
+ }
1267
+ }
1268
+ },
1269
+ "required": [
1270
+ "type",
1271
+ "observedProperty"
1272
+ ]
1273
+ },
1274
+ "parameterGroup": {
1275
+ "type": "object",
1276
+ "description": "Represents logical groups of parameters",
1277
+ "properties": {
1278
+ "type": {
1279
+ "description": "Type of the parameter group object, must be \"ParameterGroup\"",
1280
+ "const": "ParameterGroup"
1281
+ },
1282
+ "id": {
1283
+ "type": "string"
1284
+ },
1285
+ "label": {
1286
+ "$ref": "#/$defs/i18n"
1287
+ },
1288
+ "description": {
1289
+ "$ref": "#/$defs/i18n"
1290
+ },
1291
+ "observedProperty": {
1292
+ "$ref": "#/$defs/observedProperty"
1293
+ },
1294
+ "members": {
1295
+ "type": "array",
1296
+ "items": {
1297
+ "type": "string"
1298
+ },
1299
+ "minItems": 1,
1300
+ "uniqueItems": true
1301
+ }
1302
+ },
1303
+ "required": [
1304
+ "type",
1305
+ "members"
1306
+ ],
1307
+ "anyOf": [
1308
+ {
1309
+ "required": [
1310
+ "label"
1311
+ ]
1312
+ },
1313
+ {
1314
+ "required": [
1315
+ "observedProperty"
1316
+ ]
1317
+ }
1318
+ ]
1319
+ },
1320
+ "polygonValuesAxis": {
1321
+ "description": "Polygon-based axis",
1322
+ "allOf": [
1323
+ {
1324
+ "$ref": "#/$defs/valuesAxisBase"
1325
+ },
1326
+ {
1327
+ "properties": {
1328
+ "dataType": {
1329
+ "const": "polygon"
1330
+ },
1331
+ "values": {
1332
+ "items": {
1333
+ "description": "A GeoJSON polygon",
1334
+ "type": "array",
1335
+ "items": {
1336
+ "type": "array",
1337
+ "items": {
1338
+ "description": "The inner array: the coordinates themselves",
1339
+ "type": "array",
1340
+ "items": {
1341
+ "type": "number"
1342
+ },
1343
+ "minItems": 2
1344
+ },
1345
+ "minItems": 1
1346
+ },
1347
+ "minItems": 1
1348
+ }
1349
+ },
1350
+ "coordinates": {}
1351
+ },
1352
+ "required": [
1353
+ "dataType",
1354
+ "values",
1355
+ "coordinates"
1356
+ ],
1357
+ "additionalProperties": false
1358
+ }
1359
+ ]
1360
+ },
1361
+ "primitiveValuesAxis": {
1362
+ "description": "Validates any axis with primitive values",
1363
+ "allOf": [
1364
+ {
1365
+ "$ref": "#/$defs/valuesAxisBase"
1366
+ },
1367
+ {
1368
+ "$comment": "This redundant branch exists to fail early with succinct errors",
1369
+ "properties": {
1370
+ "values": {
1371
+ "items": {
1372
+ "oneOf": [
1373
+ {
1374
+ "type": "number"
1375
+ },
1376
+ {
1377
+ "type": "string"
1378
+ }
1379
+ ]
1380
+ }
1381
+ }
1382
+ }
1383
+ },
1384
+ {
1385
+ "if": {
1386
+ "properties": {
1387
+ "values": {
1388
+ "items": {
1389
+ "type": "number"
1390
+ }
1391
+ }
1392
+ }
1393
+ },
1394
+ "then": {
1395
+ "$ref": "#/$defs/numericValuesAxis"
1396
+ },
1397
+ "else": {
1398
+ "$ref": "#/$defs/stringValuesAxis"
1399
+ }
1400
+ }
1401
+ ]
1402
+ },
1403
+ "referenceSystem": {
1404
+ "type": "object",
1405
+ "properties": {
1406
+ "type": {
1407
+ "type": "string"
1408
+ }
1409
+ },
1410
+ "required": [
1411
+ "type"
1412
+ ],
1413
+ "allOf": [
1414
+ {
1415
+ "if": {
1416
+ "properties": {
1417
+ "type": {
1418
+ "const": "TemporalRS"
1419
+ }
1420
+ }
1421
+ },
1422
+ "then": {
1423
+ "description": "Temporal reference system",
1424
+ "properties": {
1425
+ "calendar": {
1426
+ "type": "string",
1427
+ "oneOf": [
1428
+ {
1429
+ "const": "Gregorian"
1430
+ },
1431
+ {
1432
+ "pattern": "^https?://"
1433
+ }
1434
+ ]
1435
+ },
1436
+ "timeScale": {
1437
+ "type": "string"
1438
+ }
1439
+ },
1440
+ "required": [
1441
+ "calendar"
1442
+ ]
1443
+ }
1444
+ },
1445
+ {
1446
+ "if": {
1447
+ "properties": {
1448
+ "type": {
1449
+ "const": "IdentifierRS"
1450
+ }
1451
+ }
1452
+ },
1453
+ "then": {
1454
+ "description": "An identifier-based reference system",
1455
+ "properties": {
1456
+ "id": {
1457
+ "type": "string"
1458
+ },
1459
+ "label": {
1460
+ "$ref": "#/$defs/i18n"
1461
+ },
1462
+ "description": {
1463
+ "$ref": "#/$defs/i18n"
1464
+ },
1465
+ "targetConcept": {
1466
+ "$ref": "#/$defs/targetConcept"
1467
+ },
1468
+ "identifiers": {
1469
+ "type": "object",
1470
+ "patternProperties": {
1471
+ ".+": {
1472
+ "$ref": "#/$defs/targetConcept"
1473
+ }
1474
+ }
1475
+ }
1476
+ },
1477
+ "required": [
1478
+ "targetConcept"
1479
+ ]
1480
+ }
1481
+ }
1482
+ ]
1483
+ },
1484
+ "referenceSystemConnection": {
1485
+ "description": "Reference System Connection object: connects coordinates to reference systems",
1486
+ "type": "object",
1487
+ "properties": {
1488
+ "coordinates": {
1489
+ "type": "array",
1490
+ "items": {
1491
+ "type": "string"
1492
+ },
1493
+ "minItems": 1
1494
+ },
1495
+ "system": {
1496
+ "$ref": "#/$defs/referenceSystem"
1497
+ }
1498
+ },
1499
+ "required": [
1500
+ "coordinates",
1501
+ "system"
1502
+ ]
1503
+ },
1504
+ "stringSingleValueAxis": {
1505
+ "description": "Axis defined by single string value",
1506
+ "allOf": [
1507
+ {
1508
+ "$ref": "#/$defs/stringValuesAxis"
1509
+ },
1510
+ {
1511
+ "properties": {
1512
+ "values": {
1513
+ "maxItems": 1
1514
+ }
1515
+ }
1516
+ }
1517
+ ]
1518
+ },
1519
+ "stringValuesAxis": {
1520
+ "description": "Simple axis with string values (e.g. time strings)",
1521
+ "allOf": [
1522
+ {
1523
+ "$ref": "#/$defs/valuesAxisBase"
1524
+ },
1525
+ {
1526
+ "properties": {
1527
+ "values": {
1528
+ "items": {
1529
+ "type": "string"
1530
+ }
1531
+ },
1532
+ "bounds": {
1533
+ "items": {
1534
+ "type": "string"
1535
+ }
1536
+ }
1537
+ },
1538
+ "additionalProperties": false
1539
+ }
1540
+ ]
1541
+ },
1542
+ "targetConcept": {
1543
+ "description": "A concept in an identifier-based reference system",
1544
+ "properties": {
1545
+ "id": {
1546
+ "type": "string"
1547
+ },
1548
+ "label": {
1549
+ "$ref": "#/$defs/i18n"
1550
+ },
1551
+ "description": {
1552
+ "$ref": "#/$defs/i18n"
1553
+ }
1554
+ },
1555
+ "required": [
1556
+ "label"
1557
+ ]
1558
+ },
1559
+ "tiledNdArray": {
1560
+ "type": "object",
1561
+ "description": "Object representing a multidimensional (>= 1D) array with named axes split up into sets of linked NdArray documents",
1562
+ "properties": {
1563
+ "type": {
1564
+ "const": "TiledNdArray"
1565
+ },
1566
+ "dataType": {
1567
+ "enum": [
1568
+ "float",
1569
+ "integer",
1570
+ "string"
1571
+ ]
1572
+ },
1573
+ "shape": {
1574
+ "type": "array",
1575
+ "items": {
1576
+ "type": "number"
1577
+ },
1578
+ "minItems": 1
1579
+ },
1580
+ "axisNames": {
1581
+ "type": "array",
1582
+ "items": {
1583
+ "type": "string"
1584
+ },
1585
+ "minItems": 1,
1586
+ "uniqueItems": true
1587
+ },
1588
+ "tileSets": {
1589
+ "type": "array",
1590
+ "minItems": 1,
1591
+ "items": {
1592
+ "type": "object",
1593
+ "properties": {
1594
+ "tileShape": {
1595
+ "type": "array",
1596
+ "items": {
1597
+ "type": [
1598
+ "number",
1599
+ "null"
1600
+ ]
1601
+ },
1602
+ "minItems": 1
1603
+ },
1604
+ "urlTemplate": {
1605
+ "type": "string",
1606
+ "description": "RFC 6570 Level 1 URI template"
1607
+ }
1608
+ },
1609
+ "required": [
1610
+ "tileShape",
1611
+ "urlTemplate"
1612
+ ]
1613
+ }
1614
+ }
1615
+ },
1616
+ "required": [
1617
+ "type",
1618
+ "dataType",
1619
+ "shape",
1620
+ "axisNames",
1621
+ "tileSets"
1622
+ ]
1623
+ },
1624
+ "tupleValuesAxis": {
1625
+ "description": "Tuple-based axis",
1626
+ "allOf": [
1627
+ {
1628
+ "$ref": "#/$defs/valuesAxisBase"
1629
+ },
1630
+ {
1631
+ "properties": {
1632
+ "dataType": {
1633
+ "const": "tuple"
1634
+ },
1635
+ "values": {
1636
+ "items": {
1637
+ "description": "A tuple of axis values (numbers or strings)",
1638
+ "type": "array",
1639
+ "items": {
1640
+ "type": [
1641
+ "number",
1642
+ "string"
1643
+ ]
1644
+ },
1645
+ "minItems": 2
1646
+ }
1647
+ },
1648
+ "coordinates": {}
1649
+ },
1650
+ "required": [
1651
+ "dataType",
1652
+ "values",
1653
+ "coordinates"
1654
+ ],
1655
+ "additionalProperties": false
1656
+ }
1657
+ ]
1658
+ },
1659
+ "unit": {
1660
+ "type": "object",
1661
+ "description": "The units of measure",
1662
+ "properties": {
1663
+ "id": {
1664
+ "type": "string"
1665
+ },
1666
+ "label": {
1667
+ "$ref": "#/$defs/i18n"
1668
+ },
1669
+ "symbol": {
1670
+ "allOf": [
1671
+ {
1672
+ "type": [
1673
+ "string",
1674
+ "object"
1675
+ ]
1676
+ },
1677
+ {
1678
+ "if": {
1679
+ "type": "object"
1680
+ },
1681
+ "then": {
1682
+ "properties": {
1683
+ "type": {
1684
+ "type": "string"
1685
+ },
1686
+ "value": {
1687
+ "type": "string"
1688
+ }
1689
+ },
1690
+ "required": [
1691
+ "type",
1692
+ "value"
1693
+ ]
1694
+ }
1695
+ }
1696
+ ]
1697
+ }
1698
+ },
1699
+ "anyOf": [
1700
+ {
1701
+ "required": [
1702
+ "label"
1703
+ ]
1704
+ },
1705
+ {
1706
+ "required": [
1707
+ "symbol"
1708
+ ]
1709
+ }
1710
+ ]
1711
+ },
1712
+ "valuesAxis": {
1713
+ "description": "Validates any values-based axis",
1714
+ "allOf": [
1715
+ {
1716
+ "$ref": "#/$defs/valuesAxisBase"
1717
+ },
1718
+ {
1719
+ "if": {
1720
+ "not": {
1721
+ "required": [
1722
+ "dataType"
1723
+ ]
1724
+ }
1725
+ },
1726
+ "then": {
1727
+ "$ref": "#/$defs/primitiveValuesAxis"
1728
+ }
1729
+ }
1730
+ ],
1731
+ "dependentSchemas": {
1732
+ "dataType": {
1733
+ "allOf": [
1734
+ {
1735
+ "if": {
1736
+ "properties": {
1737
+ "dataType": {
1738
+ "const": "tuple"
1739
+ }
1740
+ }
1741
+ },
1742
+ "then": {
1743
+ "$ref": "#/$defs/tupleValuesAxis"
1744
+ }
1745
+ },
1746
+ {
1747
+ "if": {
1748
+ "properties": {
1749
+ "dataType": {
1750
+ "const": "polygon"
1751
+ }
1752
+ }
1753
+ },
1754
+ "then": {
1755
+ "$ref": "#/$defs/polygonValuesAxis"
1756
+ }
1757
+ }
1758
+ ]
1759
+ }
1760
+ }
1761
+ },
1762
+ "valuesAxisBase": {
1763
+ "$comment": "Base schema for values-based axis schemas",
1764
+ "properties": {
1765
+ "dataType": {
1766
+ "type": "string",
1767
+ "not": {
1768
+ "const": "primitive"
1769
+ }
1770
+ },
1771
+ "values": {
1772
+ "type": "array",
1773
+ "minItems": 1,
1774
+ "uniqueItems": true
1775
+ },
1776
+ "coordinates": {
1777
+ "type": "array",
1778
+ "items": {
1779
+ "type": "string"
1780
+ },
1781
+ "minItems": 2
1782
+ },
1783
+ "bounds": {
1784
+ "description": "Optional axis bounds. Must be twice as long (and same data type) as \"values\"",
1785
+ "type": "array",
1786
+ "minItems": 2
1787
+ }
1788
+ },
1789
+ "required": [
1790
+ "values"
1791
+ ]
1792
+ }
1793
+ }
1794
+ }