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

567 lines
13 KiB
YAML
Raw Normal View History

2016-02-05 11:06:05 +01:00
tests:
2017-08-31 15:21:10 +03:00
- algorithm: gdal:aspect
name: Aspect (gdaldem)
params:
BAND: 1
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
OPTIONS: ''
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:cliprasterbyextent
name: Clip raster by extent (gdal_transform)
params:
DATA_TYPE: 5
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:cliprasterbymasklayer
name: Clip raster by mask layer (gdalwarp)
2017-08-31 14:39:51 +03:00
params:
ALPHA_BAND: false
CROP_TO_CUTLINE: true
DATA_TYPE: 5
2017-08-31 14:39:51 +03:00
INPUT:
name: dem.tif
type: raster
KEEP_RESOLUTION: false
MASK:
name: custom/polygon_mask.gml
type: vector
NODATA: 0.0
OPTIONS: ''
2017-08-31 14:39:51 +03:00
results:
OUTPUT:
hash: 4f4720e4efe59a7f238f622659917bbeb5262369d15d5e2917dbcf8b
2017-08-31 14:39:51 +03:00
type: rasterhash
- algorithm: gdal:colorrelief
name: Color relief (gdaldem)
2017-08-31 14:39:51 +03:00
params:
BAND: 1
COLOR_TABLE:
name: custom/color_relief.txt
type: file
2017-08-31 14:39:51 +03:00
COMPUTE_EDGES: false
INPUT:
name: dem.tif
type: raster
MATCH_MODE: 1
OPTIONS: ''
2017-08-31 14:39:51 +03:00
results:
OUTPUT:
hash: 3d1b5ddaf0e9763164b7865e5e4ac2d55c4993aa52de2705f2ba4232
2017-08-31 14:39:51 +03:00
type: rasterhash
- algorithm: gdal:contour
name: Contour (gdal_contour)
2017-08-14 05:49:18 +10:00
params:
BAND: 1
CREATE_3D: false
FIELD_NAME: ELEV
IGNORE_NODATA: false
2017-08-14 05:49:18 +10:00
INPUT:
name: dem.tif
type: raster
INTERVAL: 10.0
NODATA: 0.0
OFFSET: 0.0
2017-08-14 05:49:18 +10:00
results:
OUTPUT:
name: expected/gdal/contour.gml
type: vector
2017-08-14 05:49:18 +10:00
- algorithm: gdal:gdalinfo
name: gdalinfo
2017-08-14 05:49:18 +10:00
params:
INPUT:
name: dem.tif
type: raster
MIN_MAX: false
NOGCP: true
NO_METADATA: true
STATS: false
2017-08-14 05:49:18 +10:00
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'
2017-08-14 05:49:18 +10:00
- algorithm: gdal:gdal2xyz
name: gdal2xyz
params:
BAND: 1
CSV: false
INPUT:
name: dem.tif
type: raster
results:
OUTPUT:
name: expected/gdal/xyz.csv
type: file
- algorithm: gdal:tileindex
name: Tile index (gdaltindex)
2017-08-14 05:55:50 +10:00
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
2017-08-14 05:55:50 +10:00
results:
OUTPUT:
name: expected/gdal/tile_index.gml
type: vector
2017-08-14 05:55:50 +10:00
- 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
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:polygonize
name: Polygonize
params:
BAND: 1
EIGHT_CONNECTEDNESS: false
FIELD: DN
INPUT:
name: dem.tif
type: raster
results:
OUTPUT:
name: expected/gdal/polygonize.gml
type: vector
- algorithm: gdal:proximity
name: Proximity
params:
BAND: 1
DATA_TYPE: 5
INPUT:
name: dem.tif
type: raster
MAX_DISTANCE: 0.0
NODATA: 0.0
OPTIONS: ''
REPLACE: 0.0
UNITS: 1
VALUES: '90'
results:
OUTPUT:
hash: 32802271d1ce083ca14078bfefaef6300ae8809af11f6a4270583d0c
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:sieve
name: Sieve
params:
EIGHT_CONNECTEDNESS: false
INPUT:
name: dem.tif
type: raster
MASK_LAYER:
name: dem.tif
type: raster
NO_MASK: false
THRESHOLD: 10
results:
OUTPUT:
hash: 1ea6a8c838add299dc3f6f9f529eb5945664f68bae97be9ca80b1754
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: 5
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
2017-09-08 15:48:54 +03:00
- 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:pointsalonglines
name: Points along lines
params:
DISTANCE: 0.25
GEOMETRY: geometry
INPUT:
name: lines.gml
type: vector
results:
OUTPUT:
name: expected/gdal/points_along_lines.gml
type: vector
pk: fid
compare:
ignore_crs_check: true
- algorithm: gdal:offsetcurve
name: Offset curve (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
2017-09-15 11:30:16 +03:00
- 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: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
#