[processing][SAGA] Fix interpolation choices for add grid values algorithms

And add more tests

Fixes #19132
This commit is contained in:
Nyall Dawson 2018-06-08 11:09:57 +10:00
parent 4444428133
commit 77786f38c3
14 changed files with 53 additions and 3 deletions

View File

@ -2,6 +2,6 @@ Add Grid Values to Points
shapes_grid
QgsProcessingParameterFeatureSource|SHAPES|Points|0|None|False
QgsProcessingParameterMultipleLayers|GRIDS|Grids|3|None|False
QgsProcessingParameterEnum|RESAMPLING|Interpolation|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Inverse Distance Interpolation;[3] Bicubic Spline Interpolation;[4] B-Spline Interpolation
QgsProcessingParameterEnum|RESAMPLING|Interpolation|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Bicubic Spline Interpolation;[3] B-Spline Interpolation
QgsProcessingParameterVectorDestination|RESULT|Result
AllowUnmatching

View File

@ -2,6 +2,6 @@ Add Grid Values to Shapes
shapes_grid
QgsProcessingParameterFeatureSource|SHAPES|Shapes|-1|None|False
QgsProcessingParameterMultipleLayers|GRIDS|Grids|3|None|False
QgsProcessingParameterEnum|RESAMPLING|Interpolation|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Inverse Distance Interpolation;[3] Bicubic Spline Interpolation;[4] B-Spline Interpolation
QgsProcessingParameterEnum|RESAMPLING|Interpolation|[0] Nearest Neighbor;[1] Bilinear Interpolation;[2] Bicubic Spline Interpolation;[3] B-Spline Interpolation
QgsProcessingParameterVectorDestination|RESULT|Result
AllowUnmatching

View File

@ -0,0 +1 @@
UTF-8

Binary file not shown.

View File

@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]

View File

@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<SAGA_METADATA>
<HISTORY saga-version="2.3.1">
<MODULE library="shapes_grid" id="1" name="Add Grid Values to Shapes">
<OPTION type="choice" id="RESAMPLING" name="Resampling" index="0">Nearest Neighbour</OPTION>
<INPUT type="shapes" id="SHAPES" name="Shapes">
<FILE>/home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/custom/lines_over.shp</FILE>
</INPUT>
<INPUT_LIST type="grid_list" id="GRIDS" name="Grids">
<dem type="grid_list" id="GRIDS" name="Grids">
<FILE>/tmp/processing_f0fd76cf1e1e4c69bab137429bd6084c/a59bb63955554f778856866bbe0bca17/dem.sgrd</FILE>
</dem>
</INPUT_LIST>
<OUTPUT type="shapes" id="RESULT" name="Result">lines_over</OUTPUT>
</MODULE>
</HISTORY>
<SOURCE>
<FILE></FILE>
<DATABASE>
<FIELDS>
<FIELD TYPE="LONGINT">id</FIELD>
<FIELD TYPE="STRING">name</FIELD>
<FIELD TYPE="DOUBLE">dem</FIELD>
</FIELDS>
</DATABASE>
<PROJECTION></PROJECTION>
</SOURCE>
<DESCRIPTION></DESCRIPTION>
</SAGA_METADATA>

View File

@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]

View File

@ -46,6 +46,23 @@ tests:
name: expected/saga/add_grid_to_points.shp
type: vector
- algorithm: saga:addrastervaluestofeatures
name: Add raster values to shapes
params:
GRIDS:
params:
- name: dem.tif
type: raster
type: multi
RESAMPLING: 0
SHAPES:
name: custom/lines_over.shp
type: vector
results:
RESULT:
name: expected/saga/add_grid_to_shapes.shp
type: vector
- algorithm: saga:mergevectorlayers
name: Merge vector layers
params: