gdalmdiminfo_output.schema.json 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. {
  2. "$id": "https://gdal.org/gdalmdiminfo_output.schema.json",
  3. "$schema": "http://json-schema.org/draft-07/schema#",
  4. "description": "Validate the output of the gdalmdiminfo utility",
  5. "anyOf": [
  6. { "$ref": "#/definitions/group" },
  7. { "$ref": "#/definitions/array" }
  8. ],
  9. "definitions": {
  10. "array": {
  11. "type": "object",
  12. "properties": {
  13. "name": { "type": "string" },
  14. "type": { "type": "string", "enum": ["array"] },
  15. "datatype": { "$ref": "#/definitions/datatype" },
  16. "dimensions": { "$ref": "#/definitions/dimensions" },
  17. "attributes": { "$ref": "#/definitions/attributes" },
  18. "srs": { "$ref": "#/definitions/srs" },
  19. "nodata_value": { "$ref": "#/definitions/value" },
  20. "scale": { "type": "number"},
  21. "offset": { "type": "number"},
  22. "values": { "$ref": "#/definitions/value" },
  23. "unit": { "type": "string"},
  24. "structural_info": { "$ref": "#/definitions/structural_info" }
  25. },
  26. "additionalProperties": false
  27. },
  28. "arrays": {
  29. "type": "object",
  30. "properties": {},
  31. "additionalProperties": {
  32. "$ref": "#/definitions/array"
  33. }
  34. },
  35. "attribute": {
  36. "anyOf": [
  37. {
  38. "type": "object",
  39. "properties": {
  40. "name": { "type": "string" },
  41. "type": { "type": "string", "enum": ["attribute"] },
  42. "datatype": { "$ref": "#/definitions/datatype" },
  43. "value": { "$ref": "#/definitions/value" }
  44. },
  45. "additionalProperties": false
  46. },
  47. {
  48. "$ref": "#/definitions/value"
  49. }
  50. ]
  51. },
  52. "attributes": {
  53. "anyOf": [
  54. {
  55. "type": "object",
  56. "properties": {},
  57. "additionalProperties": {
  58. "$ref": "#/definitions/attribute"
  59. }
  60. },
  61. {
  62. "type": "array",
  63. "items": { "$ref": "#/definitions/attribute" }
  64. }
  65. ]
  66. },
  67. "compound_datatype": {
  68. "type": "object",
  69. "properties":
  70. {
  71. "name": { "type": "string" },
  72. "size": { "type": "integer" },
  73. "components": {
  74. "type": "array",
  75. "items": {
  76. "type": "object",
  77. "properties":
  78. {
  79. "name": { "type": "string" },
  80. "offset": { "type": "integer" },
  81. "type": { "$ref": "#/definitions/datatype" }
  82. },
  83. "additionalProperties": false
  84. }
  85. }
  86. },
  87. "additionalProperties": false
  88. },
  89. "datatype": {
  90. "anyOf": [
  91. { "type": "string",
  92. "enum": [ "String",
  93. "Byte", "Int16", "UInt16", "Int32", "UInt32",
  94. "Float32", "Float64",
  95. "CInt16", "CInt32", "CFloat32", "CFloat64" ] },
  96. { "$ref": "#/definitions/compound_datatype" }
  97. ]
  98. },
  99. "dimension": {
  100. "type": "object",
  101. "properties":{
  102. "name": { "type": "string" },
  103. "full_name": { "type": "string" },
  104. "size": {"type": "integer"},
  105. "type": {"type": "string"},
  106. "direction": {"type": "string"},
  107. "indexing_variable": {"type": "string"}
  108. },
  109. "additionalProperties": false
  110. },
  111. "dimensions": {
  112. "type": "array",
  113. "items": {
  114. "anyOf": [
  115. {
  116. "$ref": "#/definitions/dimension"
  117. },
  118. {
  119. "description": "Full qualified name of a dimension",
  120. "type": "string"
  121. }
  122. ]
  123. }
  124. },
  125. "group": {
  126. "type": "object",
  127. "properties": {
  128. "driver": { "type": "string" },
  129. "name": { "type": "string" },
  130. "type": { "type": "string", "enum": ["group"] },
  131. "dimensions": { "$ref": "#/definitions/dimensions" },
  132. "arrays": { "$ref": "#/definitions/arrays" },
  133. "attributes": { "$ref": "#/definitions/attributes" },
  134. "groups": { "$ref": "#/definitions/groups" },
  135. "structural_info": { "$ref": "#/definitions/structural_info" }
  136. },
  137. "additionalProperties": false
  138. },
  139. "groups": {
  140. "anyOf": [
  141. {
  142. "type": "object",
  143. "properties": {},
  144. "additionalProperties": {
  145. "$ref": "#/definitions/group"
  146. }
  147. },
  148. {
  149. "type": "array",
  150. "items": { "$ref": "#/definitions/group" }
  151. }
  152. ]
  153. },
  154. "srs": {
  155. "type": "object",
  156. "properties": {
  157. "wkt": { "type": "string" },
  158. "data_axis_to_srs_axis_mapping": {
  159. "type": "array", "items": { "type": "integer"} }
  160. },
  161. "additionalProperties": false
  162. },
  163. "structural_info": {
  164. "type": "object",
  165. "properties": {},
  166. "additionalProperties": {
  167. "type": "string"
  168. }
  169. },
  170. "value": {
  171. "anyOf": [
  172. {"type": "string"},
  173. {"type": "number"},
  174. {"type": "object"},
  175. {"type": "array"}
  176. ]
  177. }
  178. }
  179. }