tfcat-v0.3.0.json 14.5 KB
Newer Older
Cecconi Baptiste's avatar
Cecconi Baptiste committed
1
{
Cecconi Baptiste's avatar
Cecconi Baptiste committed
2
    "$schema": "http://json-schema.org/draft-07/schema#",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
3
    "$id": "https://vparis-ns.obspm.fr/maser/tfcat/v1.0/schema#",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
4
5
6
7
8
9
10
11
12
    "title": "TFCat",
    "type": "object",
    "required": [
        "type",
        "features",
        "crs"
    ],
    "properties": {
        "type": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
13
            "type": "string",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
14
15
16
17
18
19
            "enum": ["FeatureCollection"]
        },
        "features": {
            "type": "array",
            "items": {
                "title": "TFCat Feature",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
20
21
                "type": "object",
                "required": [
Cecconi Baptiste's avatar
Cecconi Baptiste committed
22
23
24
                    "type",
                    "properties",
                    "geometry"
Cecconi Baptiste's avatar
Cecconi Baptiste committed
25
26
                ],
                "properties": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
                    "type": {
                        "type": "string",
                        "enum": ["Feature"]
                    },
                    "id": {
                        "oneOf": [
                            {"type": "number"},
                            {"type": "string"}
                        ]
                    },
                    "properties": {
                        "oneOf": [
                            {"type": "null"},
                            {"type": "object"}
                        ]
                    },
                    "geometry": {
                        "oneOf": [
                            {"type": "null"},
                            {"$ref": "#/$defs/TFCatPoint"},
                            {"$ref": "#/$defs/TFCatLineString"},
                            {"$ref": "#/$defs/TFCatPolygon"},
                            {"$ref": "#/$defs/TFCatMultiPoint"},
                            {"$ref": "#/$defs/TFCatMultiLineString"},
                            {"$ref": "#/$defs/TFCatMultiPolygon"},
                            {
                                "title": "TFCat GeometryCollection",
                                "type": "object",
                                "required": [
                                    "type",
                                    "geometries"
                                ],
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "enum": ["GeometryCollection"]
                                    },
                                    "geometries": {
                                        "type": "array",
                                        "items": {
                                            "oneOf": [
                                                {"$ref": "#/$defs/TFCatPoint"},
                                                {"$ref": "#/$defs/TFCatLineString"},
                                                {"$ref": "#/$defs/TFCatPolygon"},
                                                {"$ref": "#/$defs/TFCatMultiPoint"},
                                                {"$ref": "#/$defs/TFCatMultiLineString"},
                                                {"$ref": "#/$defs/TFCatMultiPolygon"}
                                            ]
                                        }
                                    },
                                    "bbox": {"$ref": "#/$defs/bbox"}
                                }
                            }
                        ]
                    },
                    "bbox": {"$ref": "#/$defs/bbox"}
                }
            }
        },
        "bbox": {"$ref": "#/$defs/bbox"},
        "properties": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
88
89
90
91
            "oneOf": [
                {"type": "null"},
                {"type": "object"}
            ]
Cecconi Baptiste's avatar
Cecconi Baptiste committed
92
93
        },
        "fields": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
            "oneOf": [
                {"type": "null"},
                {
                    "type": "object",
                    "patternProperties": {
                        ".*": {
                            "type": "object",
                            "required": [
                                "info",
                                "ucd",
                                "datatype"
                            ],
                            "properties": {
                                "info": {
                                    "type": "string",
                                    "$comment": "A description of the the current field"
                                },
                                "ucd": {
                                    "type": "string",
                                    "$comment": "A valid UCD (IVOA Unified Content Description)."
                                },
                                "datatype": {
                                    "type": "string",
                                    "enum": [
                                        "int",
                                        "float",
                                        "bool",
                                        "str"
                                    ]
                                },
                                "unit": {
                                    "type": "string",
                                    "$comment": "A valid unit, as defined in the VOUnit specification."
                                }
                            }
                        }
                    }
                }
            ]
Cecconi Baptiste's avatar
Cecconi Baptiste committed
133
134
135
136
137
138
139
140
141
142
        },
        "crs": {
            "title": "Coordinate Reference System",
            "type": "object",
            "required": [
                "type",
                "properties"
            ],
            "properties": {
                "type": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
143
                    "type": "string",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
144
                    "enum": ["Cartesian"]
Cecconi Baptiste's avatar
Cecconi Baptiste committed
145
146
147
148
                },
                "properties": {
                    "type": "object",
                    "required": [
Cecconi Baptiste's avatar
Cecconi Baptiste committed
149
                        "name",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
150
151
152
153
154
                        "time_coords",
                        "spectral_coords",
                        "ref_position"
                    ],
                    "properties": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
155
156
157
158
159
160
161
162
163
                        "name": {
                            "type": "string",
                            "enum": [
                                "Time-Frequency",
                                "Time-Wavelength",
                                "Time-Energy",
                                "Time-Wavenumber"
                            ]
                        },
Cecconi Baptiste's avatar
Cecconi Baptiste committed
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
                        "time_coords": {
                            "type": "object",
                            "required": [
                                "id",
                                "name",
                                "unit",
                                "time_origin",
                                "time_scale"
                            ],
                            "properties": {
                                "id": {
                                    "type": "string",
                                    "enum": [
                                        "unix",
                                        "jd",
                                        "mjd"
                                    ]
                                },
                                "name": {"type": "string"},
                                "unit": {
                                    "type": "string",
                                    "$comment": "value set to the unit of the time axis. The unit MUST be a valid VOUnit string."
                                },
                                "time_origin": {
                                    "type": "string",
                                    "$comment": "value set to the origin of the time axis, expressed in ISO 8601 format."
                                },
                                "time_scale": {
                                    "type": "string",
                                    "enum": [
                                        "GPS",
                                        "TAI",
                                        "TCB",
                                        "TCG",
                                        "TDB",
                                        "TT",
                                        "UT",
                                        "UTC",
                                        "UNKNOWN",
                                        "SCET",
                                        "SCLK"
                                    ],
                                    "$comment": "values in the list: GPS, TAI, TCB, TCG, TDB, TT, UT, UTC, UNKNOWN. The definition of the time scale terms is available from https://www.ivoa.net/rdf/timescale/ Two additional allowed values are: SCET (SpaceCraft Event Time), SCLK (Spacecraft Clock). They refer to the time measured by the spacecraft clock, SCET being transformed into a user readable unit, and SCLK is in the internal spacecraft clock format."
                                }
                            }
                        },
                        "spectral_coords": {
                            "type": "object",
                            "required": [
                                "name",
                                "unit"
                            ],
                            "properties": {
                                "name": {
                                    "type": "string",
                                    "enum": [
                                        "Frequency",
                                        "Energy",
                                        "Wavenumber",
                                        "Wavelength"
                                    ]
                                },
                                "unit": {
                                    "type": "string",
                                    "$comment": "value set to the unit of the spectral axis. The unit MUST be a valid VOUnit string."
                                }
                            }
                        },
                        "ref_position": {
                            "type": "object",
                            "required": ["id"],
                            "properties": {
                                "id": {
                                    "type": "string",
                                    "$comment": "The allowed values for this member SHOULD be either from the https://www.ivoa.net/rdf/refposition list of values, or the spacecraft name."
                                }
                            }
                        }
Cecconi Baptiste's avatar
Cecconi Baptiste committed
242
243
                    }
                }
Cecconi Baptiste's avatar
Cecconi Baptiste committed
244
245
246
247
248
249
250
251
252
253
            }
        }
    },
    "$defs": {
        "bbox": {
            "type": "array",
            "minItems": 4,
            "maxItems": 4,
            "items": {"type": "number"}
        },
Cecconi Baptiste's avatar
Cecconi Baptiste committed
254
255
256
257
258
259
        "coordinates": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "items": {"type": "number"}
        },
Cecconi Baptiste's avatar
Cecconi Baptiste committed
260
261
262
263
264
265
266
267
268
        "TFCatPoint": {
            "title": "TFCat Point",
            "type": "object",
            "required": [
                "type",
                "coordinates"
            ],
            "properties": {
                "type": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
269
                    "type": "string",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
270
271
                    "enum": ["Point"]
                },
Cecconi Baptiste's avatar
Cecconi Baptiste committed
272
                "coordinates": {"$ref": "#/$defs/coordinates"},
Cecconi Baptiste's avatar
Cecconi Baptiste committed
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
                "bbox": {"$ref": "#/$defs/bbox"}
            }
        },
        "TFCatLineString": {
            "title": "TFCat LineString",
            "type": "object",
            "required": [
                "type",
                "coordinates"
            ],
            "properties": {
                "type": {
                    "type": "string",
                    "enum": ["LineString"]
                },
                "coordinates": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
289
                    "type": "array",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
290
                    "minItems": 2,
Cecconi Baptiste's avatar
Cecconi Baptiste committed
291
                    "items": {"$ref": "#/$defs/coordinates"}
Cecconi Baptiste's avatar
Cecconi Baptiste committed
292
293
294
295
296
297
298
299
300
301
302
303
304
                },
                "bbox": {"$ref": "#/$defs/bbox"}
            }
        },
        "TFCatPolygon": {
            "title": "TFCat Polygon",
            "type": "object",
            "required": [
                "type",
                "coordinates"
            ],
            "properties": {
                "type": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
305
                    "type": "string",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
306
307
308
                    "enum": ["Polygon"]
                },
                "coordinates": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
309
310
311
                    "type": "array",
                    "items": {
                        "type": "array",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
312
                        "minItems": 4,
Cecconi Baptiste's avatar
Cecconi Baptiste committed
313
                        "items": {"$ref": "#/$defs/coordinates"}
Cecconi Baptiste's avatar
Cecconi Baptiste committed
314
                    }
Cecconi Baptiste's avatar
Cecconi Baptiste committed
315
316
317
318
319
320
321
322
323
324
325
326
327
                },
                "bbox": {"$ref": "#/$defs/bbox"}
            }
        },
        "TFCatMultiPoint": {
            "title": "TFCat MultiPoint",
            "type": "object",
            "required": [
                "type",
                "coordinates"
            ],
            "properties": {
                "type": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
328
                    "type": "string",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
329
330
331
                    "enum": ["MultiPoint"]
                },
                "coordinates": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
332
                    "type": "array",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
333
                    "items": {"$ref": "#/$defs/coordinates"}
Cecconi Baptiste's avatar
Cecconi Baptiste committed
334
335
336
337
338
339
340
341
342
343
344
345
346
                },
                "bbox": {"$ref": "#/$defs/bbox"}
            }
        },
        "TFCatMultiLineString": {
            "title": "TFCat MultiLineString",
            "type": "object",
            "required": [
                "type",
                "coordinates"
            ],
            "properties": {
                "type": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
347
                    "type": "string",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
348
349
350
                    "enum": ["MultiLineString"]
                },
                "coordinates": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
351
352
353
354
                    "type": "array",
                    "items": {
                        "type": "array",
                        "minItems": 2,
Cecconi Baptiste's avatar
Cecconi Baptiste committed
355
                        "items": {"$ref": "#/$defs/coordinates"}
Cecconi Baptiste's avatar
Cecconi Baptiste committed
356
                    }
Cecconi Baptiste's avatar
Cecconi Baptiste committed
357
358
359
360
361
362
363
364
365
366
367
368
369
                },
                "bbox": {"$ref": "#/$defs/bbox"}
            }
        },
        "TFCatMultiPolygon": {
            "title": "TFCat MultiPolygon",
            "type": "object",
            "required": [
                "type",
                "coordinates"
            ],
            "properties": {
                "type": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
370
                    "type": "string",
Cecconi Baptiste's avatar
Cecconi Baptiste committed
371
372
373
                    "enum": ["MultiPolygon"]
                },
                "coordinates": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
374
375
376
377
                    "type": "array",
                    "items": {
                        "type": "array",
                        "items": {
Cecconi Baptiste's avatar
Cecconi Baptiste committed
378
379
                            "type": "array",
                            "minItems": 4,
Cecconi Baptiste's avatar
Cecconi Baptiste committed
380
                            "items": {"$ref": "#/$defs/coordinates"}
Cecconi Baptiste's avatar
Cecconi Baptiste committed
381
382
                        }
                    }
Cecconi Baptiste's avatar
Cecconi Baptiste committed
383
384
                },
                "bbox": {"$ref": "#/$defs/bbox"}
Cecconi Baptiste's avatar
Cecconi Baptiste committed
385
386
387
            }
        }
    }
Cecconi Baptiste's avatar
Cecconi Baptiste committed
388
}