forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathgdal_algorithm.schema.json
216 lines (211 loc) · 7.12 KB
/
gdal_algorithm.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
88
89
90
91
92
93
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
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
{
"$id": "https://gdal.org/gdal_algorithm.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Validate the output of the 'gdal [command] [subcommand] --json-usage'",
"oneOf": [
{
"$ref": "#/definitions/algorithm"
}
],
"definitions": {
"algorithm": {
"type": "object",
"properties": {
"name": {
"type": "string",
"$comment": "Algorithm name. Normally always set, except for the top 'gdal' algorithm"
},
"full_path": {
"type": "array",
"items": {
"type": "string"
},
"$comment": "Full path to get to this algorithm. For example, for 'gdal raster info', this will be [\"gdal\", \"raster\", \"info\"]"
},
"description": {
"type": "string",
"$comment": "One sentence description of the algorithm"
},
"short_url": {
"type": "string",
"$comment": "URL to the help page, without the server. For example \"/programs/gdal_raster_info.html\""
},
"url": {
"type": "string",
"$comment": "Full URL to the help page. For example \"https://gdal.org/programs/gdal_raster_info.html\""
},
"sub_algorithms": {
"type": "array",
"items": {
"$ref": "#/definitions/algorithm"
},
"$comment": "Names of the immediate sub-algorithm of this algorithm. For example, or 'gdal raster', this will be [\"info\", \"convert\", ...]"
},
"input_arguments": {
"type": "array",
"items": {
"$ref": "#/definitions/argument"
},
"$comment": "Input arguments of the algorithm"
},
"output_arguments": {
"type": "array",
"items": {
"$ref": "#/definitions/argument"
},
"$comment": "Output arguments of the algorithm, that is arguments that are set by the algorithm (typically an output dataset)"
},
"input_output_arguments": {
"type": "array",
"items": {
"$ref": "#/definitions/argument"
},
"$comment": "Arguments of the algorithm that are both read and written by it."
},
"pipeline_algorithms": {
"type": "array",
"items": {
"$ref": "#/definitions/algorithm"
},
"$comment": "For pipeline algorithm, description of the accepted step algorithms. Only present for such pipeline algorithms"
},
"supports_streamed_output": {
"type": "boolean",
"$comment": "Whether the algorithm supports a streamed output dataset"
}
},
"required": [
"description",
"sub_algorithms",
"input_arguments",
"output_arguments",
"input_output_arguments"
],
"additionalProperties": false
},
"argument": {
"type": "object",
"properties": {
"name": {
"type": "string",
"$comment": "Argument name"
},
"type": {
"enum": [
"boolean",
"integer",
"real",
"string",
"dataset",
"integer_list",
"real_list",
"string_list",
"dataset_list"
],
"$comment": "Argument type"
},
"description": {
"type": "string",
"$comment": "Argument description"
},
"choices": {
"type": "array",
"items": {
"type": "string"
},
"$comment": "Valid values for the argument, when it accepts an enumeration as a value"
},
"default": {
"$comment": "Default value (optional)"
},
"min_value": {
"type": "number",
"$comment": "Minimum value allowed"
},
"min_value_is_included": {
"type": "boolean",
"$comment": "Whether min_value is included"
},
"max_value": {
"type": "number",
"$comment": "Maximum value allowed"
},
"max_value_is_included": {
"type": "boolean",
"$comment": "Whether max_value is included"
},
"required": {
"type": "boolean",
"$comment": "Whether this argument is required"
},
"packed_values_allowed": {
"type": "boolean",
"$comment": "For command-line specification, for multi-valued arguments (type: integer_list, real_list, string_list), whether comma-separated values are accepted. e.g. '--my-arg=first,second'"
},
"repeated_arg_allowed": {
"type": "boolean",
"$comment": "For command-line specification, for multi-valued arguments (type: integer_list, real_list, string_list), whether several repetition of the argument are accepted. e.g. '--my-arg first --my-arg second'"
},
"min_count": {
"type": "integer",
"$comment": "For multi-valued arguments (type: integer_list, real_list, string_list, dataset_list), minimum number of values"
},
"max_count": {
"type": "integer",
"$comment": "For multi-valued arguments (type: integer_list, real_list, string_list, dataset_list), maximum number of values"
},
"category": {
"type": "string",
"$comment": "Category of the argument. Common categories include \"Base\", \"Advanced\", \"Esoteric\", but algorithms may define their own categories."
},
"mutual_exclusion_group": {
"type": "string",
"$comment": "Identifier shared by several arguments to mean they are mutually exclusive."
},
"metadata": {
"type": "object",
"$comment": "Object whose keys are metadata item names. This is typically used for type=dataset arguments. e.g. \"metadata\":{ \"required_capabilities\":[ \"DCAP_RASTER\", \"DCAP_CREATECOPY\" ] }"
},
"dataset_type": {
"type": "array",
"items": {
"enum": [
"raster",
"vector",
"multidim_raster"
]
},
"$comment": "Type of accepted datasets. Only used for type=dataset or type=dataset_list."
},
"input_flags": {
"type": "array",
"items": {
"enum": [
"name",
"dataset"
]
},
"$comment": "Which fields of a dataset argument may be set, by the user, when the argument is dealt as an input dataset. Only used for type=dataset or type=dataset_list."
},
"output_flags": {
"type": "array",
"items": {
"enum": [
"name",
"dataset"
]
},
"$comment": "Which fields of a dataset argument may be set, by the algorithm, when the argument is dealt as an output dataset. Only used for type=dataset or type=dataset_list."
}
},
"required": [
"name",
"type",
"description",
"required",
"category"
],
"additionalProperties": false
}
}
}