mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
[processing] add support for custom parameter used in interpolation algs
to the test suite
This commit is contained in:
parent
37d82bb7a5
commit
ea4f05d931
@ -142,6 +142,14 @@ class AlgorithmsTest(object):
|
|||||||
return [self.load_param(p) for p in param['params']]
|
return [self.load_param(p) for p in param['params']]
|
||||||
elif param['type'] == 'file':
|
elif param['type'] == 'file':
|
||||||
return self.filepath_from_param(param)
|
return self.filepath_from_param(param)
|
||||||
|
elif param['type'] == 'interpolation':
|
||||||
|
prefix = processingTestDataPath()
|
||||||
|
tmp = ''
|
||||||
|
for r in param['name'].split(';'):
|
||||||
|
v = r.split(',')
|
||||||
|
tmp += '{},{},{},{};'.format(os.path.join(prefix, v[0]),
|
||||||
|
v[1], v[2], v[3])
|
||||||
|
return tmp[:-1]
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# No type specified, use whatever is there
|
# No type specified, use whatever is there
|
||||||
return param
|
return param
|
||||||
|
@ -1234,7 +1234,9 @@ tests:
|
|||||||
COLUMNS: 300
|
COLUMNS: 300
|
||||||
DISTANCE_COEFFICIENT: 2.0
|
DISTANCE_COEFFICIENT: 2.0
|
||||||
EXTENT: 0, 8, -5, 3
|
EXTENT: 0, 8, -5, 3
|
||||||
INTERPOLATION_DATA: /home/alex/devel/qgis/python/plugins/processing/tests/testdata/pointsz.gml,False,1,0
|
INTERPOLATION_DATA:
|
||||||
|
name: pointsz.gml,False,1,0
|
||||||
|
type: interpolation
|
||||||
ROWS: 300
|
ROWS: 300
|
||||||
results:
|
results:
|
||||||
OUTPUT_LAYER:
|
OUTPUT_LAYER:
|
||||||
@ -1249,7 +1251,9 @@ tests:
|
|||||||
COLUMNS: 300
|
COLUMNS: 300
|
||||||
DISTANCE_COEFFICIENT: 2.0
|
DISTANCE_COEFFICIENT: 2.0
|
||||||
EXTENT: 0, 8, -5, 3
|
EXTENT: 0, 8, -5, 3
|
||||||
INTERPOLATION_DATA: /home/alex/devel/qgis/python/plugins/processing/tests/testdata/pointsz.gml,True,-1,0
|
INTERPOLATION_DATA:
|
||||||
|
name: pointsz.gml,True,-1,0
|
||||||
|
type: interpolation
|
||||||
ROWS: 300
|
ROWS: 300
|
||||||
results:
|
results:
|
||||||
OUTPUT_LAYER:
|
OUTPUT_LAYER:
|
||||||
@ -1263,7 +1267,9 @@ tests:
|
|||||||
CELLSIZE_Y: 0.02667
|
CELLSIZE_Y: 0.02667
|
||||||
COLUMNS: 300
|
COLUMNS: 300
|
||||||
EXTENT: 0, 8, -5, 3
|
EXTENT: 0, 8, -5, 3
|
||||||
INTERPOLATION_DATA: /home/alex/devel/qgis/python/plugins/processing/tests/testdata/pointsz.gml,False,1,0
|
INTERPOLATION_DATA:
|
||||||
|
name: pointsz.gml,False,1,0
|
||||||
|
type: interpolation
|
||||||
METHOD: '0'
|
METHOD: '0'
|
||||||
ROWS: 300
|
ROWS: 300
|
||||||
results:
|
results:
|
||||||
@ -1281,7 +1287,9 @@ tests:
|
|||||||
CELLSIZE_Y: 0.02667
|
CELLSIZE_Y: 0.02667
|
||||||
COLUMNS: 300
|
COLUMNS: 300
|
||||||
EXTENT: 0, 8, -5, 3
|
EXTENT: 0, 8, -5, 3
|
||||||
INTERPOLATION_DATA: /home/alex/devel/qgis/python/plugins/processing/tests/testdata/pointsz.gml,True,-1,0
|
INTERPOLATION_DATA:
|
||||||
|
name: pointsz.gml,True,-1,0
|
||||||
|
type: interpolation
|
||||||
METHOD: '1'
|
METHOD: '1'
|
||||||
ROWS: 300
|
ROWS: 300
|
||||||
results:
|
results:
|
||||||
@ -1292,7 +1300,6 @@ tests:
|
|||||||
# name: expected/triangulation.gml
|
# name: expected/triangulation.gml
|
||||||
# type: vector
|
# type: vector
|
||||||
|
|
||||||
|
|
||||||
- algorithm: qgis:removenullgeometries
|
- algorithm: qgis:removenullgeometries
|
||||||
name: Remove null geometries
|
name: Remove null geometries
|
||||||
params:
|
params:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user