-
-
Notifications
You must be signed in to change notification settings - Fork 3k
/
gdal_algorithm_tests.yaml
696 lines (656 loc) · 15.9 KB
/
gdal_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
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
tests:
- algorithm: gdal:aspect
name: Aspect (gdaldem)
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
OPTIONS: ''
TRIG_ANGLE: false
ZERO_FLAT: false
ZEVENBERGEN: false
results:
OUTPUT:
hash: 8436df662a44a00762aa29768e5d6ecfaf2d42e9a4da02d8afc6e3f6
type: rasterhash
- algorithm: gdal:cliprasterbyextent
name: Clip raster by extent (gdal_transform)
params:
DATA_TYPE: 6
INPUT:
name: dem.tif
type: raster
NODATA: 0.0
OPTIONS: ''
PROJWIN: 18.673038221977773,18.699957975064194,45.782253906735804,45.80350236352593
results:
OUTPUT:
hash: f4dd2d3693afe0b95a6b6d0c98a57331b8f7c6a61a372f52da912c07
type: rasterhash
- algorithm: gdal:cliprasterbyextent
name: Test (gdal:cliprasterbyextent)
params:
DATA_TYPE: 6
INPUT:
name: dem.tif
type: raster
NODATA: 0.0
OPTIONS: ''
PROJWIN: 18.674136950224096,18.70011285383855,45.78239420868433,45.80342583519035
[EPSG:4326]
results:
OUTPUT:
hash: c71cf9c654ee0f27ea8778576787301a868556e52773cb061a8fff00
type: rasterhash
- algorithm: gdal:cliprasterbymasklayer
name: Clip raster by mask layer (gdalwarp)
params:
ALPHA_BAND: false
CROP_TO_CUTLINE: true
DATA_TYPE: 6
INPUT:
name: dem.tif
type: raster
KEEP_RESOLUTION: false
MASK:
name: custom/polygon_mask.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
hash: 4f4720e4efe59a7f238f622659917bbeb5262369d15d5e2917dbcf8b
type: rasterhash
- algorithm: gdal:colorrelief
name: Color relief (gdaldem)
params:
BAND: 1
COLOR_TABLE:
name: custom/color_relief.txt
type: file
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
MATCH_MODE: 2
OPTIONS: ''
results:
OUTPUT:
hash: f714597fadc9cfc3f5263dc0e35f7c6ba285de238dce439e4988faac
type: rasterhash
- algorithm: gdal:colorrelief
name: Color relief (gdaldem)
params:
BAND: 1
COLOR_TABLE:
name: custom/color_relief.txt
type: file
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
MATCH_MODE: 1
OPTIONS: ''
results:
OUTPUT:
hash: 3d1b5ddaf0e9763164b7865e5e4ac2d55c4993aa52de2705f2ba4232
type: rasterhash
- algorithm: gdal:contour
name: Contour (gdal_contour)
params:
BAND: 1
CREATE_3D: false
FIELD_NAME: ELEV
CREATE_3D: true
IGNORE_NODATA: false
INPUT:
name: dem.tif
type: raster
INTERVAL: 10.0
NODATA: 0.0
OFFSET: 0.0
results:
OUTPUT:
name: expected/gdal/contour.gml
type: vector
- algorithm: gdal:extractprojection
name: Extract Projection (extractprojection)
params:
INPUT:
name: dem.tif
type: raster
PRJ_FILE_CREATE: True
results:
WORLD_FILE:
name: expected/gdal/dem.wld
type: file
PRJ_FILE:
name: expected/gdal/dem.prj
type: file
- algorithm: gdal:extractprojection
name: Extract Projection (extractprojection)
params:
INPUT:
name: dem.tif
type: raster
PRJ_FILE_CREATE: False
results:
WORLD_FILE:
name: expected/gdal/dem.wld
type: file
- algorithm: gdal:gdalinfo
name: gdalinfo
params:
INPUT:
name: dem.tif
type: raster
MIN_MAX: false
NOGCP: true
NO_METADATA: true
STATS: false
results:
OUTPUT:
name: expected/gdal/raster_info.html
type: regex
rules:
- 'Origin = \(18.666297944200000,45.811701437600000\)'
- 'Band 1 Block=373x5 Type=Float32, ColorInterp=Gray'
- ' NoData Value=-99999'
- algorithm: gdal:tileindex
name: Tile index (gdaltindex)
params:
ABSOLUTE_PATH: true
CRS_FIELD_NAME: ''
CRS_FORMAT: 0
LAYERS:
params:
- name: dem.tif
type: raster
type: multi
PATH_FIELD_NAME: location
PROJ_DIFFERENCE: false
results:
OUTPUT:
name: expected/gdal/tile_index.gml
type: vector
compare:
fields:
location: skip
- algorithm: gdal:gridaverage
name: Moving average interpolation (gdal_grid)
params:
ANGLE: 0.0
DATA_TYPE: 5
INPUT:
name: pointsz.gml
type: vector
MIN_POINTS: 0
NODATA: 0.0
OPTIONS: ''
RADIUS_1: 5.0
RADIUS_2: 5.0
results:
OUTPUT:
hash: 1c3adf57a7e319582736a1a222211e2360115fc930d6a12415dbdec3
type: rasterhash
- algorithm: gdal:griddatametrics
name: Data metrics interpolation (gdal_grid)
params:
ANGLE: 0.0
DATA_TYPE: 5
INPUT:
name: pointsz.gml
type: vector
METRIC: 2
MIN_POINTS: 0
NODATA: 0.0
OPTIONS: ''
RADIUS_1: 5.0
RADIUS_2: 5.0
results:
OUTPUT:
hash: 11075786ce1a8f5875c203a881f39bb49e7d9f9adcb83c286c72b644
type: rasterhash
- algorithm: gdal:gridinversedistance
name: Inverse distance to a power interpolation (gdal_grid)
params:
ANGLE: 0.0
DATA_TYPE: 5
INPUT:
name: pointsz.gml
type: vector
MAX_POINTS: 0
MIN_POINTS: 0
NODATA: 0.0
OPTIONS: ''
POWER: 2.0
RADIUS_1: 0.0
RADIUS_2: 0.0
SMOOTHING: 0.0
results:
OUTPUT:
hash: 26658f6dd6a1dd4b576b2e71d3b31f1679d7144b8e53fb58502eff64
type: rasterhash
- algorithm: gdal:gridinversedistancenearestneighbor
name: Inverse distance to a power with nearest neighbor searching (gdal_grid)
params:
DATA_TYPE: 5
INPUT:
name: pointsz.gml
type: vector
MAX_POINTS: 0
MIN_POINTS: 0
NODATA: 0.0
OPTIONS: ''
POWER: 2.0
RADIUS: 5.0
SMOOTHING: 0.0
results:
OUTPUT:
hash: 34fb2b6dc92f5f4147bf136a46dd872f4f94d3bca259d10c8c388620
type: rasterhash
- algorithm: gdal:gridlinear
name: Linear interpolation (gdal_grid)
params:
DATA_TYPE: 5
INPUT:
name: pointsz.gml
type: vector
NODATA: 0.0
OPTIONS: ''
RADIUS: -1.0
results:
OUTPUT:
hash:
- aca7c839c679613f4910cbdea660359f1551c104c57fea9a61795668
- 57e2bc100ec9836e2aa7df4ccf6b5715bd3f3524a524ce47bec52f68
- e607570f34b1c61bc622751b324023b67642b657ef4b91a80d9057cb
type: rasterhash
- algorithm: gdal:gridnearestneighbor
name: Nearest neighbor interpolation (gdal_grid)
params:
ANGLE: 0.0
DATA_TYPE: 5
INPUT:
name: pointsz.gml
type: vector
NODATA: 0.0
OPTIONS: ''
RADIUS_1: 0.0
RADIUS_2: 0.0
results:
OUTPUT:
hash: 354f728b1dd133ad3db28a51b956bf3108615d31363f3a55b2ce04b9
type: rasterhash
- algorithm: gdal:hillshade
name: Hillshade (gdaldem)
params:
ALTITUDE: 45.0
AZIMUTH: 315.0
BAND: 1
COMBINED: false
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
MULTIDIRECTIONAL: false
OPTIONS: ''
SCALE: 1.0
ZEVENBERGEN: false
Z_FACTOR: 1.0
results:
OUTPUT:
hash: e5cf91b875b918682e456463165eddc4af4ae8855b143068e198ce2a
type: rasterhash
- algorithm: gdal:nearblack
name: Near black
params:
INPUT:
name: dem.tif
type: raster
NEAR: 15
WHITE: false
results:
OUTPUT:
hash: fff4a08498e93494f3f2cf1a9074451e6fd68341849aedc9e2c45e6a
type: rasterhash
- algorithm: gdal:rasterize
name: Test (gdal:rasterize)
params:
BURN: 0.0
DATA_TYPE: 5
EXTENT: -1.0,10.0,-3.0,6.0 [EPSG:4326]
FIELD: intval
HEIGHT: 10.0
INIT: 0.0
INPUT:
name: polys.gml
type: vector
INVERT: false
NODATA: 0.0
OPTIONS: ''
UNITS: 0
WIDTH: 10.0
results:
OUTPUT:
hash: 30409eb496900df4ceeab37200a91552c350dbc7761eb089dd75a329
type: rasterhash
- algorithm: gdal:roughness
name: Roughness
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
OPTIONS: ''
results:
OUTPUT:
hash: ee2b317e022da1001378fac60c9b613a74d3566b9870f9d121e6e322
type: rasterhash
- algorithm: gdal:slope
name: Slope
params:
AS_PERCENT: false
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
OPTIONS: ''
SCALE: 1.0
ZEVENBERGEN: false
results:
OUTPUT:
hash: 319c470de3315f440371d5df8a6e478a8ecaf1cf904a013dbf1b3a6a
type: rasterhash
- algorithm: gdal:tpitopographicpositionindex
name: Topographic position index
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
OPTIONS: ''
results:
OUTPUT:
hash: 4af1fe42d2a75c92eb9edcad9d77bd6cae958c0212de11e320fad689
type: rasterhash
- algorithm: gdal:triterrainruggednessindex
name: Terrain ruggedness index
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
OPTIONS: ''
results:
OUTPUT:
hash: c888764a08fae72a129dfff4947149c3185532373d33d4537ecf409c
type: rasterhash
- algorithm: gdal:warpreproject
name: Warp (gdalwarp)
params:
DATA_TYPE: 6
INPUT:
name: dem.tif
type: raster
MULTITHREADING: false
NODATA: 0.0
OPTIONS: ''
RESAMPLING: 4
SOURCE_CRS: EPSG:4326
TARGET_CRS: EPSG:3857
TARGET_RESOLUTION: 0.0
results:
OUTPUT:
hash: 77045222f6f9d8e5fda795d1d5288eae400c51522e621861aeab68e0
type: rasterhash
# - algorithm: gdal:merge
# name: Merge 2 raster layers
# params:
# INPUT:
# params:
# - name: custom/dem_to_merge1.tif
# type: raster
# - name: custom/dem_to_merge2.tif
# type: raster
# type: multi
# PCT: false
# RTYPE: '5'
# SEPARATE: false
# results:
# OUTPUT:
# hash: fb6f0f4081308cc188eda2fbe106e04e0ebf866fc56853f0cca8db1c
# type: rasterhash
#
# - algorithm: gdal:rastercalculator
# name: Simple Raster Calculator test with only 1 raster
# params:
# BAND_A: '1'
# FORMULA: A/2
# INPUT_A:
# name: dem.tif
# type: raster
# RTYPE: '5'
# results:
# OUTPUT:
# hash: 2d0585dc8166fbe3cec7d9e6fd66e95cc9bdb1043b3b0fa7cbdfef4c
# type: rasterhash
- algorithm: gdal:buffervectors
name: Buffer lines
params:
DISSOLVE: false
DISTANCE: 0.5
EXPLODE_COLLECTIONS: false
GEOMETRY: geometry
INPUT:
name: lines.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/buffer_lines.gml
type: vector
- algorithm: gdal:buffervectors
name: BUffer lines with dissolve
params:
DISSOLVE: true
DISTANCE: 1.0
EXPLODE_COLLECTIONS: false
GEOMETRY: geometry
INPUT:
name: lines.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/buffer_lines_dissolve.gml
type: vector
- algorithm: gdal:buffervectors
name: Buffer polygons
params:
DISSOLVE: false
DISTANCE: 0.5
EXPLODE_COLLECTIONS: false
GEOMETRY: geometry
INPUT:
name: polys.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/buffer_polys.gml
type: vector
- algorithm: gdal:buffervectors
name: Buffer polygons with dissolve
params:
DISSOLVE: true
DISTANCE: 0.5
EXPLODE_COLLECTIONS: false
GEOMETRY: geometry
INPUT:
name: polys.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/buffer_polys_dissolve.gml
type: vector
- algorithm: gdal:clipvectorbyextent
name: Clip points by extent
params:
EXTENT: 0.6180722891566264,5.408433734939758,0.4337349397590362,2.306024096385542
[EPSG:4326]
INPUT:
name: points.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/clip_points.gml
type: vector
- algorithm: gdal:clipvectorbyextent
name: Clip lines by extent
params:
EXTENT: 4.362348178137652,8.698380566801621,-1.193522267206478,3.0914979757085024
[EPSG:4326]
INPUT:
name: lines.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/clip_lines.gml
type: vector
- algorithm: gdal:clipvectorbyextent
name: Clip polygons by extent
params:
EXTENT: 0.7143072289156609,4.718222891566264,1.4430722891566266,5.390060240963856
[EPSG:4326]
INPUT:
name: polys.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/clip_polygons.gml
type: vector
# Fail on Travis with
# ERROR 1: TopologyException: Input geom 1 is invalid: Self-intersection at or near point 2 -1 at 2 -1
# - algorithm: gdal:clipvectorbypolygon
# name: Clip points by polygons
# params:
# INPUT:
# name: points.gml
# type: vector
# MASK:
# name: polys.gml
# type: vector
# OPTIONS: ''
# results:
# OUTPUT:
# name: expected/gdal/clip_points_by_polygon.gml
# type: vector
#
# - algorithm: gdal:clipvectorbypolygon
# name: Clip lines by polygons
# params:
# INPUT:
# name: lines.gml
# type: vector
# MASK:
# name: polys.gml
# type: vector
# OPTIONS: ''
# results:
# OUTPUT:
# name: expected/gdal/clip_lines_by_polygon.gml
# type: vector
- algorithm: gdal:clipvectorbypolygon
name: Clip lines by multipolygons
params:
INPUT:
name: lines.gml
type: vector
MASK:
name: multipolys.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/clip_lines_by_multipolygon.gml
type: vector
- algorithm: gdal:executesql
name: Execute SQL
params:
DIALECT: 0
INPUT:
name: polys.gml
type: vector
OPTIONS: ''
SQL: SELECT * FROM polys2 WHERE intval=2
results:
OUTPUT:
name: expected/gdal/execute_sql.gml
type: vector
- algorithm: gdal:offsetcurve
name: Offset curve (right-sided)
params:
DISTANCE: -0.5
GEOMETRY: geometry
INPUT:
name: lines.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/offset_lines.gml
type: vector
- algorithm: gdal:ogrinfo
name: ogrinfo
params:
INPUT:
name: lines.gml
type: vector
SUMMARY_ONLY: 'True'
results:
OUTPUT:
name: expected/gdal/vector_info.html
type: regex
rules:
- 'Extent: \(-1.000000, -3.000000\) - \(11.000000, 5.000000\)'
- 'Geometry: Line String'
- 'Feature Count: [6|7]' # On some platforms returns 6 instead of 7...
- algorithm: gdal:onesidebuffer
name: One-sided buffer (left-handed)
params:
BUFFER_SIDE: 1
DISSOLVE: false
DISTANCE: 0.5
EXPLODE_COLLECTIONS: false
GEOMETRY: geometry
INPUT:
name: lines.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/one_side_buffer.gml
type: vector
- algorithm: gdal:pointsalonglines
name: Points along lines
params:
DISTANCE: 0.25
GEOMETRY: geometry
INPUT:
name: lines.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/points_along_lines.gml
type: vector