QGIS/python/plugins/processing/tests/testdata/gdal_algorithm_tests.yaml

727 lines
17 KiB
YAML
Raw Normal View History

2016-02-05 11:06:05 +01:00
# See ../README.md for a description of the file format
tests:
# - algorithm: gdal:gdalinfo
# name: gdalinfo
# params:
# INPUT:
# name: raster.tif
# type: raster
# NOGCP: false
# NOMETADATA: false
# results:
# OUTPUT:
# name: expected/gdal/raster_info.html
# type: regex
# rules:
# - 'Origin = \(270736.067325068172067,4459029.574521748349071\)'
# - 'Band 1 Block=16x14 Type=Float32, ColorInterp=Gray'
# - ' NoData Value=-32768'
#
# - 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:buffervectors
# name: Buffer lines
# params:
# DISSOLVEALL: false
# DISTANCE: 1.0
# GEOMETRY: geometry
# INPUT_LAYER:
# name: lines.gml
# type: vector
# MULTI: false
# results:
# OUTPUT_LAYER:
# name: expected/gdal/buffer_lines.gml
# type: vector
# compare:
# geometry:
# precision: 7
# expectedFailure:
# - int(1)
#
# - algorithm: gdal:buffervectors
# name: Basic polygon buffer
# params:
# DISSOLVEALL: false
# DISTANCE: 0.5
# GEOMETRY: geometry
# INPUT_LAYER:
# name: polys.gml
# type: vector
# MULTI: false
# results:
# OUTPUT_LAYER:
# name: expected/gdal/buffer_polys.gml
# type: vector
# compare:
# geometry:
# precision: 7
#
# - algorithm: gdal:buffervectors
# name: Polygon buffer with dissolve
# params:
# DISSOLVEALL: true
# DISTANCE: 0.5
# GEOMETRY: geometry
# INPUT_LAYER:
# name: polys.gml
# type: vector
# MULTI: false
# results:
# OUTPUT_LAYER:
# name: expected/gdal/buffer_polys_dissolve.gml
# type: vector
# compare:
# geometry:
# precision: 7
#
- algorithm: gdal:createpointsalonglines
name: Points along lines
params:
DISTANCE: 0.25
GEOMETRY: geometry
2017-08-14 02:55:41 +10:00
INPUT:
name: lines.gml
type: vector
results:
2017-08-14 02:55:41 +10:00
OUTPUT:
name: expected/gdal/points_along_lines.gml
type: vector
pk: fid
compare:
ignore_crs_check: true
# - algorithm: gdal:offsetlinesforlines
# name: Offset lines for lines (right-handed)
# params:
# GEOMETRY: geometry
# INPUT_LAYER:
# name: lines.gml
# type: vector
# RADIUS: -0.5
# results:
# OUTPUT_LAYER:
# name: expected/gdal/offset_lines.gml
# type: vector
# compare:
# geometry:
# precision: 7
#
# - algorithm: gdal:singlesidedbufferforlines
# name: One-side buffer for lines (left-handed)
# params:
# DISSOLVEALL: false
# GEOMETRY: geometry
# INPUT_LAYER:
# name: lines.gml
# type: vector
# LEFTRIGHT: '1'
# MULTI: false
# RADIUS: 0.5
# results:
# OUTPUT_LAYER:
# name: expected/gdal/one_side_buffer.gml
# type: vector
# compare:
# geometry:
# precision: 7
2017-08-14 05:05:39 +10:00
- algorithm: gdal:aspect
name: Aspect with standard parameters
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
TRIG_ANGLE: false
ZERO_FLAT: false
ZEVENBERGEN: false
results:
OUTPUT:
hash: 8436df662a44a00762aa29768e5d6ecfaf2d42e9a4da02d8afc6e3f6
type: rasterhash
- algorithm: gdal:aspect
name: Aspect without NULL (-9999) values (0 instead)
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
TRIG_ANGLE: false
ZERO_FLAT: true
ZEVENBERGEN: false
results:
OUTPUT:
hash: 43cccb440c7febb0095103eee3509b740e9f1bf2b3ad3b8a4c25622e
type: rasterhash
- algorithm: gdal:aspect
name: Aspect with trigonometric angle
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
TRIG_ANGLE: true
ZERO_FLAT: false
ZEVENBERGEN: false
results:
OUTPUT:
hash: a95e8a09a613b551d3f33dfb4975c430f599dc55f761063ae9529124
type: rasterhash
- algorithm: gdal:aspect
name: Aspect zevenbergen
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
TRIG_ANGLE: false
ZERO_FLAT: false
ZEVENBERGEN: true
results:
OUTPUT:
hash: 2cd5868b21efbd286f4977795143c89df77ac8976f8bc2a2c4e310d8
type: rasterhash
- algorithm: gdal:aspect
name: Aspect with edges
params:
BAND: 1
COMPUTE_EDGES: true
INPUT:
name: dem.tif
type: raster
TRIG_ANGLE: false
ZERO_FLAT: false
ZEVENBERGEN: false
results:
OUTPUT:
hash: d3a354c6e5f207779bb58f9bd23fd89a9f90a77d81aafc661d0ae077
type: rasterhash
# - algorithm: gdal:cliprasterbyextent
# name: Clip raster by extent
# params:
# BIGTIFF: '0'
# COMPRESS: '4'
# INPUT:
# name: dem.tif
# type: raster
# JPEGCOMPRESSION: 75
# PREDICTOR: 1
# PROJWIN: 18.67551824296977,18.697800756150787,45.78984181545589,45.804309302274866
# RTYPE: '5'
# TFW: false
# TILED: false
# ZLEVEL: 6
# results:
# OUTPUT:
# hash: 9913a7c0e1ced2c2ce1cd8f0e8103475bc2b0dd4d1d0adafe4920f93
# type: rasterhash
#
# - algorithm: gdal:cliprasterbyextent
# name: Clip raster by extent and change no data values
# params:
# BIGTIFF: '0'
# COMPRESS: '4'
# INPUT:
# name: dem.tif
# type: raster
# JPEGCOMPRESSION: 75
# NO_DATA: '-9999'
# PREDICTOR: 1
# PROJWIN: 18.67460436727692,18.698371162148714,45.78995019401027,45.804344168369234
# RTYPE: '5'
# TFW: false
# TILED: false
# ZLEVEL: 6
# results:
# OUTPUT:
# hash: df5de501bcec0c10f738d77f3b48d5545b48f0a22e0e028a8b1ccbe7
# type: rasterhash
#
# - algorithm: gdal:cliprasterbymasklayer
# name: Clip raster by mask layer
# params:
# ALPHA_BAND: false
# BIGTIFF: '0'
# COMPRESS: '4'
# CROP_TO_CUTLINE: true
# INPUT:
# name: dem.tif
# type: raster
# JPEGCOMPRESSION: 75
# KEEP_RESOLUTION: false
# MASK:
# name: custom/polygon_mask.gml
# type: vector
# NO_DATA: ''
# PREDICTOR: 1
# RTYPE: '5'
# TFW: false
# TILED: false
# ZLEVEL: 6
# results:
# OUTPUT:
# hash: 4f4720e4efe59a7f238f622659917bbeb5262369d15d5e2917dbcf8b
# type: rasterhash
#
# - algorithm: gdal:cliprasterbymasklayer
# name: Clip raster by mask layer and change no data value
# params:
# ALPHA_BAND: false
# BIGTIFF: '0'
# COMPRESS: '4'
# CROP_TO_CUTLINE: true
# INPUT:
# name: dem.tif
# type: raster
# JPEGCOMPRESSION: 75
# KEEP_RESOLUTION: false
# MASK:
# name: custom/polygon_mask.gml
# type: vector
# NO_DATA: '-9999'
# PREDICTOR: 1
# RTYPE: '5'
# TFW: false
# TILED: false
# ZLEVEL: 6
# results:
# OUTPUT:
# hash: 1e0252e63c65dcf4ed1f2b17d2490d3e0331aeb59d8f59b59554f442
# type: rasterhash
#
# - algorithm: gdal:cliprasterbymasklayer
# name: Clip raster by mask layer and add alpha band
# params:
# ALPHA_BAND: true
# BIGTIFF: '0'
# COMPRESS: '4'
# CROP_TO_CUTLINE: true
# INPUT:
# name: dem.tif
# type: raster
# JPEGCOMPRESSION: 75
# KEEP_RESOLUTION: false
# MASK:
# name: custom/polygon_mask.gml
# type: vector
# NO_DATA: ''
# PREDICTOR: 1
# RTYPE: '5'
# TFW: false
# TILED: false
# ZLEVEL: 6
# results:
# OUTPUT:
# hash: 8f69431c6ff7db5174c1ca8e879ae39582fd4ce86f9b53edae0f38ce
# type: rasterhash
- algorithm: gdal:hillshade
name: Hillshade
params:
ALTITUDE: 45.0
AZIMUTH: 315.0
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
SCALE: 1.0
ZEVENBERGEN: false
Z_FACTOR: 1.0
results:
OUTPUT:
hash: e5cf91b875b918682e456463165eddc4af4ae8855b143068e198ce2a
type: rasterhash
- algorithm: gdal:hillshade
name: Hillshade with edges calculation
params:
ALTITUDE: 45.0
AZIMUTH: 315.0
BAND: 1
COMPUTE_EDGES: true
INPUT:
name: dem.tif
type: raster
SCALE: 1.0
ZEVENBERGEN: false
Z_FACTOR: 1.0
results:
OUTPUT:
hash: 570671408b020c9cc817e876f0e8081e0b11920c7d297abfe1cb3368
type: rasterhash
- algorithm: gdal:hillshade
name: Hillshade with Zevenbergen formula
params:
ALTITUDE: 45.0
AZIMUTH: 315.0
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
SCALE: 1.0
ZEVENBERGEN: true
Z_FACTOR: 1.0
results:
OUTPUT:
hash: ce2174ab155023367d38785fb867456c6a1ae3535ea0ec5ad7a694d5
type: rasterhash
# - algorithm: gdal:slope
# name: Slope
# params:
# AS_PERCENT: false
# BAND: 1
# COMPUTE_EDGES: false
# INPUT:
# name: dem.tif
# type: raster
# SCALE: 1.0
# ZEVENBERGEN: false
# results:
# OUTPUT:
# hash: 319c470de3315f440371d5df8a6e478a8ecaf1cf904a013dbf1b3a6a
# type: rasterhash
#
# - algorithm: gdal:slope
# name: Slope with edges
# params:
# AS_PERCENT: false
# BAND: 1
# COMPUTE_EDGES: true
# INPUT:
# name: dem.tif
# type: raster
# SCALE: 1.0
# ZEVENBERGEN: false
# results:
# OUTPUT:
# hash: f7f8df8b6517fd8660304f7f2fbd6ade2ae68035f4dd9a224c80b465
# type: rasterhash
#
# - algorithm: gdal:slope
# name: Slope with Zevenbergen formula
# params:
# AS_PERCENT: false
# BAND: 1
# COMPUTE_EDGES: false
# INPUT:
# name: dem.tif
# type: raster
# SCALE: 1.0
# ZEVENBERGEN: true
# results:
# OUTPUT:
# hash: 90e42b1bc7be9cf7b4a729c6db44dde0bba39dd33012ade6bc8080e7
# type: rasterhash
#
# - algorithm: gdal:slope
# name: Slope with percent instead of degree
# params:
# AS_PERCENT: true
# BAND: 1
# COMPUTE_EDGES: false
# INPUT:
# name: dem.tif
# type: raster
# SCALE: 1.0
# ZEVENBERGEN: false
# results:
# OUTPUT:
# hash: c9dc888254a571e7fbf66691fb72b35f030f87decf59ce67e32ad89d
# type: rasterhash
#
# - algorithm: gdal:roughness
# name: standard roughness
# params:
# BAND: 1
# COMPUTE_EDGES: false
# INPUT:
# name: dem.tif
# type: raster
# results:
# OUTPUT:
# hash: ee2b317e022da1001378fac60c9b613a74d3566b9870f9d121e6e322
# type: rasterhash
#
# - algorithm: gdal:roughness
# name: roughness with edges
# params:
# BAND: 1
# COMPUTE_EDGES: true
# INPUT:
# name: dem.tif
# type: raster
# results:
# OUTPUT:
# hash: aba5167b8a2e97a93b22d406e0363f91c151fd353c0fc56ce24ac5fc
# type: rasterhash
2017-08-14 05:49:18 +10:00
- algorithm: gdal:triterrainruggednessindex
name: standard TRI
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
results:
OUTPUT:
hash: c888764a08fae72a129dfff4947149c3185532373d33d4537ecf409c
type: rasterhash
- algorithm: gdal:triterrainruggednessindex
name: TRI with edges
params:
BAND: 1
COMPUTE_EDGES: true
INPUT:
name: dem.tif
type: raster
results:
OUTPUT:
hash: 07376c74de869323125ceacbb5e34438655ff73f63d4b3ff3e268f7f
type: rasterhash
- algorithm: gdal:nearblack
name: standard near black
params:
INPUT:
name: dem.tif
type: raster
NEAR: 15
WHITE: false
results:
OUTPUT:
hash: fff4a08498e93494f3f2cf1a9074451e6fd68341849aedc9e2c45e6a
type: rasterhash
# - algorithm: gdal:tpitopographicpositionindex
# name: standard TPI
# params:
# BAND: 1
# COMPUTE_EDGES: false
# INPUT:
# name: dem.tif
# type: raster
# results:
# OUTPUT:
# hash: 4af1fe42d2a75c92eb9edcad9d77bd6cae958c0212de11e320fad689
# type: rasterhash
#
# - algorithm: gdal:tpitopographicpositionindex
# name: TPI with edges
# params:
# BAND: 1
# COMPUTE_EDGES: true
# INPUT:
# name: dem.tif
# type: raster
# results:
# OUTPUT:
# hash: f468bb08cbede2b606018a7a45a51cc221307a8421a11daefabeac12
# type: rasterhash
2017-08-14 05:55:50 +10:00
- algorithm: gdal:colorrelief
name: Standard Color Relief
params:
BAND: 1
COLOR_TABLE:
name: custom/color_relief.txt
type: file
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
MATCH_MODE: '0'
results:
OUTPUT:
hash: f714597fadc9cfc3f5263dc0e35f7c6ba285de238dce439e4988faac
type: rasterhash
- algorithm: gdal:colorrelief
name: Color Relief with edges
params:
BAND: 1
COLOR_TABLE:
name: custom/color_relief.txt
type: file
COMPUTE_EDGES: true
INPUT:
name: dem.tif
type: raster
MATCH_MODE: '0'
results:
OUTPUT:
hash: f714597fadc9cfc3f5263dc0e35f7c6ba285de238dce439e4988faac
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:merge
# name: Merge layers and separate in bands
# 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: true
# results:
# OUTPUT:
# hash: cbf7b8ca91e7d6cab5ef76eeed6ce80e5dbe173afb7b8eb4aed2e969
# type: rasterhash
#
# - algorithm: gdal:proximity
# name: Proximity raster
# params:
# BUF_VAL: -1
# INPUT:
# name: custom/dem_boolean.tif
# type: raster
# MAX_DIST: -1
# NODATA: -1
# RTYPE: '5'
# UNITS: '0'
# VALUES: '1'
# results:
# OUTPUT:
# hash: a497763f44380ec33acab572a926a6516e875f2284fc55e702abbdfc
# 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:gridinvdist
# name: IDW interpolation
# params:
# ANGLE: 0.0
# INPUT:
# name: custom/points_values.gml
# type: vector
# MAX_POINTS: 0.0
# MIN_POINTS: 0.0
# NODATA: 0.0
# POWER: 2.0
# RADIUS_1: 0.0
# RADIUS_2: 0.0
# RTYPE: '5'
# SMOTHING: 0.0
# Z_FIELD: EC
# results:
# OUTPUT:
# hash: 2033731d6fd653da391a2633158f0ea755d96e1b2b2c60a9100332b1
# type: rasterhash
#
# - algorithm: gdal:griddatametrics
# name: Data Metrics interpolation
# params:
# ANGLE: 0.0
# INPUT:
# name: custom/points_values.gml
# type: vector
# METRIC: '1'
# MIN_POINTS: 0.0
# NODATA: 0.0
# RADIUS_1: 0.01
# RADIUS_2: 0.02
# RTYPE: '5'
# Z_FIELD: EC
# results:
# OUTPUT:
# hash: 220953299b18286b57ce093a054323e59add7c78c0429a02e51b4ad4
# type: rasterhash
#
# - algorithm: gdal:gridaverage
# name: Moving Average interpolation
# params:
# ANGLE: 0.0
# INPUT:
# name: custom/points_values.gml
# type: vector
# MIN_POINTS: 0.0
# NODATA: 0.0
# RADIUS_1: 0.01
# RADIUS_2: 0.01
# RTYPE: '5'
# Z_FIELD: EC
# results:
# OUTPUT:
# hash: 3542d928bccee955b1c426cac7b698c603c9a385429ca529758083bf
# type: rasterhash
#
# - algorithm: gdal:gridnearestneighbor
# name: Nearest Neighbor interpolation
# params:
# ANGLE: 0.0
# INPUT:
# name: custom/points_values.gml
# type: vector
# NODATA: 0.0
# RADIUS_1: 0.01
# RADIUS_2: 0.02
# RTYPE: '5'
# Z_FIELD: EC
# results:
# OUTPUT:
# hash: 6ee933d53e1a2ffadfd88333919255e68bb945e833e50d112124bfd5
# type: rasterhash