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

521 lines
12 KiB
YAML
Raw Normal View History

2016-02-05 11:06:05 +01:00
tests:
2017-08-30 17:44:52 +10:00
- 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-31 15:21:10 +03:00
#
# - 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
2017-08-31 15:21:10 +03:00
- algorithm: gdal:aspect
name: Aspect
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
2017-08-31 15:21:10 +03:00
TRIG_ANGLE: false
ZERO_FLAT: false
ZEVENBERGEN: false
results:
OUTPUT:
2017-08-31 15:21:10 +03:00
hash: 8436df662a44a00762aa29768e5d6ecfaf2d42e9a4da02d8afc6e3f6
type: rasterhash
- algorithm: gdal:hillshade
2017-08-31 15:21:10 +03:00
name: Hillshade
params:
ALTITUDE: 45.0
AZIMUTH: 315.0
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
SCALE: 1.0
2017-08-31 15:21:10 +03:00
ZEVENBERGEN: false
Z_FACTOR: 1.0
results:
OUTPUT:
2017-08-31 15:21:10 +03:00
hash: e5cf91b875b918682e456463165eddc4af4ae8855b143068e198ce2a
type: rasterhash
2017-08-31 14:39:51 +03:00
- 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
2017-08-31 15:21:10 +03:00
- algorithm: gdal:roughness
name: Roughness
2017-08-31 14:39:51 +03:00
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
results:
OUTPUT:
2017-08-31 15:21:10 +03:00
hash: ee2b317e022da1001378fac60c9b613a74d3566b9870f9d121e6e322
2017-08-31 14:39:51 +03:00
type: rasterhash
2017-08-14 05:49:18 +10:00
- algorithm: gdal:triterrainruggednessindex
2017-08-31 15:21:10 +03:00
name: Terrain ruggedness index
2017-08-14 05:49:18 +10:00
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
results:
OUTPUT:
hash: c888764a08fae72a129dfff4947149c3185532373d33d4537ecf409c
type: rasterhash
2017-08-31 15:21:10 +03:00
- algorithm: gdal:tpitopographicpositionindex
name: Topographic position index
2017-08-14 05:49:18 +10:00
params:
BAND: 1
2017-08-31 15:21:10 +03:00
COMPUTE_EDGES: false
2017-08-14 05:49:18 +10:00
INPUT:
name: dem.tif
type: raster
results:
OUTPUT:
2017-08-31 15:21:10 +03:00
hash: 4af1fe42d2a75c92eb9edcad9d77bd6cae958c0212de11e320fad689
2017-08-14 05:49:18 +10:00
type: rasterhash
- algorithm: gdal:nearblack
2017-08-31 15:21:10 +03:00
name: Near black
params:
INPUT:
name: dem.tif
type: raster
NEAR: 15
WHITE: false
results:
OUTPUT:
hash: fff4a08498e93494f3f2cf1a9074451e6fd68341849aedc9e2c45e6a
type: rasterhash
2017-08-14 05:55:50 +10:00
- algorithm: gdal:colorrelief
2017-08-31 15:21:10 +03:00
name: Color relief
2017-08-14 05:55:50 +10:00
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: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: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:gridinversedistance
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: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
- 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: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