/
saga_algorithm_tests.yaml
360 lines (338 loc) · 8.12 KB
/
saga_algorithm_tests.yaml
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
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
# See ../README.md for a description of the file format
tests:
- algorithm: saga:invertgrid
name: Raster tools - Invert grid
params:
GRID:
name: dem.tif
type: raster
results:
INVERSE:
hash: 8e3947b878a00f70ce837fba962f6be6d3f0c8eae2d614099b015f1e
type: rasterhash
- algorithm: saga:fixeddistancebuffer
name: Vector general - Fixed distance buffer (polygon)
params:
DARC: 5.0
DISSOLVE: false
DIST_FIELD_DEFAULT: 0.5
NZONES: 1
POLY_INNER: false
SHAPES:
name: polys.gml
type: vector
results:
BUFFER:
name: expected/saga/buffer_polys.shp
type: vector
- algorithm: saga:addrastervaluestopoints
name: Simple add raster values to points
params:
GRIDS:
params:
- name: dem.tif
type: raster
type: multi
RESAMPLING: 0
SHAPES:
name: custom/points_over.shp
type: vector
results:
RESULT:
name: expected/saga/add_grid_to_points.shp
type: vector
- algorithm: saga:addrastervaluestofeatures
name: Add raster values to shapes
params:
GRIDS:
params:
- name: dem.tif
type: raster
type: multi
RESAMPLING: 0
SHAPES:
name: custom/lines_over.shp
type: vector
results:
RESULT:
name: expected/saga/add_grid_to_shapes.shp
type: vector
- algorithm: saga:mergevectorlayers
name: Merge vector layers
params:
INPUT:
params:
- name: points.gml
type: vector
- name: points_in_polys.gml
type: vector
type: multi
MATCH: true
SRCINFO: true
results:
MERGED:
name: expected/saga/merge_vector_layers.shp
type: vector
- algorithm: saga:reclassifyvaluessimple
name: Reclassify values (simple)
params:
GRID_IN:
name: raster.tif
type: raster
LOOKUP:
- 800
- 840
- 1
- 840
- 870
- 2
- 870
- 1000
- 3
METHOD: 2
results:
GRID_OUT:
hash: 57437ebf7eb3667c5aa390598120967b0a2cd5d85751185bb445d1f8
type: rasterhash
- algorithm: saga:rastercalculator
name: Raster calculator, 1 input
params:
FORMULA: a*10
GRIDS:
name: raster.tif
type: raster
RESAMPLING: 3
TYPE: 7
USE_NODATA: false
XGRIDS:
params: []
type: multi
results:
RESULT:
hash: 68d805a45416467e0f1be3066dd642772cf8ffdff9535f3254cd5ffb
type: rasterhash
- algorithm: saga:rastercalculator
name: Raster calculator, 2 inputs
params:
FORMULA: a*10+b
GRIDS:
name: raster.tif
type: raster
RESAMPLING: 3
TYPE: 7
USE_NODATA: false
XGRIDS:
params:
- name: raster.tif
type: raster
type: multi
results:
RESULT:
hash: c8c2c7c32ad3eaa1ebb491aed7af7d16f1c7f574a3de1f7622894092
type: rasterhash
- algorithm: saga:rastercalculator
name: Raster calculator, 3 inputs
params:
FORMULA: a*10+b-c
GRIDS:
name: raster.tif
type: raster
RESAMPLING: 3
TYPE: 7
USE_NODATA: false
XGRIDS:
params:
- name: dem.tif
type: raster
- name: raster.tif
type: raster
type: multi
results:
RESULT:
hash: a11f159696f5726eedaa16e872fd2582cf8a88c8c1d84d72560e4647
type: rasterhash
- algorithm: saga:simplekriging
name: Simple kriging
params:
BLOCK: true
DBLOCK: 1.0
FIELD: elev
LOG: false
POINTS:
name: pointsz.gml
type: vector
SEARCH_DIRECTION: 0
SEARCH_POINTS_ALL: 0
SEARCH_POINTS_MAX: 10
SEARCH_POINTS_MIN: 3
SEARCH_RADIUS: 5.0
SEARCH_RANGE: 0
TARGET_USER_FITS: 0
TARGET_USER_SIZE: 1.0
TQUALITY: 0
VAR_MAXDIST: -1.0
VAR_MODEL: a + b * x
VAR_NCLASSES: 100
VAR_NSKIP: 1
results:
PREDICTION:
hash: a1f5a1d369cef86332a914442c444d1c0753e471523cb838d0b2bc09
type: rasterhash
VARIANCE:
hash: 4f0378da7f0ff16326b6c404a202b004b66dbffcda38f42544a11490
type: rasterhash
- algorithm: saga:ordinarykriging
name: Ordinary Kriging
params:
BLOCK: true
DBLOCK: 1.0
FIELD: elev
LOG: true
POINTS:
name: pointsz.gml
type: vector
SEARCH_DIRECTION: 0
SEARCH_POINTS_ALL: 0
SEARCH_POINTS_MAX: 10
SEARCH_POINTS_MIN: 3
SEARCH_RADIUS: 5.0
SEARCH_RANGE: 0
TARGET_USER_FITS: 0
TARGET_USER_SIZE: 1.0
TQUALITY: 0
VAR_MAXDIST: -1.0
VAR_MODEL: a + b * x
VAR_NCLASSES: 100
VAR_NSKIP: 1
results:
PREDICTION:
hash: 0fff15c98a1c5af9eab6c242559a5f4484a7a40f5be399899b24fd39
type: rasterhash
VARIANCE:
hash: ec7b708609178533ac2b89cd575140415ef93c70396fa630d1c15b67
type: rasterhash
- algorithm: saga:universalkriging
name: Universal Kriging
params:
BLOCK: true
DBLOCK: 1.0
FIELD: elev
LOG: true
POINTS:
name: pointsz.gml
type: vector
SEARCH_DIRECTION: 0
SEARCH_POINTS_ALL: 0
SEARCH_POINTS_MAX: 10
SEARCH_POINTS_MIN: 3
SEARCH_RADIUS: 5.0
SEARCH_RANGE: 0
TARGET_USER_FITS: 0
TARGET_USER_SIZE: 1.0
TQUALITY: 0
VAR_MAXDIST: -1.0
VAR_MODEL: a + b * x
VAR_NCLASSES: 100
VAR_NSKIP: 1
results:
PREDICTION:
hash: 0fff15c98a1c5af9eab6c242559a5f4484a7a40f5be399899b24fd39
type: rasterhash
VARIANCE:
hash: ec7b708609178533ac2b89cd575140415ef93c70396fa630d1c15b67
type: rasterhash
- algorithm: saga:polygonupdate
name: Polygon update
params:
A:
name: custom/overlay1_a.geojson
type: vector
B:
name: custom/overlay1_b.geojson
type: vector
SPLIT: true
results:
RESULT:
name: expected/saga/polygon_update.shp
type: vector
- algorithm: saga:polygonunion
name: Polygon union
params:
A:
name: custom/overlay1_a.geojson
type: vector
B:
name: custom/overlay1_b.geojson
type: vector
SPLIT: true
results:
RESULT:
name: expected/saga/polygon_union.shp
type: vector
- algorithm: saga:polygonidentity
name: Polygon identity
params:
A:
name: custom/overlay1_a.geojson
type: vector
B:
name: custom/overlay1_b.geojson
type: vector
SPLIT: true
results:
RESULT:
name: expected/saga/polygon_identity.shp
type: vector
- algorithm: saga:difference
name: Polygon difference
params:
A:
name: custom/overlay1_a.geojson
type: vector
B:
name: custom/overlay1_b.geojson
type: vector
SPLIT: true
results:
RESULT:
name: expected/saga/polygon_difference.shp
type: vector
# Note - SAGA results are wrong here, so really we are just testing that the algorithm runs. Use the native one instead!
- algorithm: saga:symmetricaldifference
name: Polygon symmetrical difference
params:
A:
name: custom/overlay1_a.geojson
type: vector
B:
name: custom/overlay1_b.geojson
type: vector
SPLIT: true
results:
RESULT:
name: expected/saga/polygon_symmetrical_difference.shp
type: vector
- algorithm: saga:intersect
name: Polygon intersect
params:
A:
name: custom/overlay1_a.geojson
type: vector
B:
name: custom/overlay1_b.geojson
type: vector
SPLIT: true
results:
RESULT:
name: expected/saga/polygon_intersect.shp
type: vector
- algorithm: saga:polygonselfintersection
name: Polygon self intersection
params:
POLYGONS:
name: custom/overlay2_b.geojson
type: vector
results:
INTERSECT:
name: expected/saga/polygon_self_intersection.shp
type: vector