Skip to content

Commit

Permalink
[processing][SAGA] Fix interpolation choices for add grid values algo…
Browse files Browse the repository at this point in the history
…rithms

And add more tests

Fixes #19132
  • Loading branch information
nyalldawson committed Jun 8, 2018
1 parent 4444428 commit 77786f3
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 3 deletions.
Expand Up @@ -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
Expand Up @@ -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
@@ -0,0 +1 @@
UTF-8
Binary file not shown.
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
@@ -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.
Binary file not shown.
@@ -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>
@@ -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.
Expand Up @@ -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:
Expand Down Expand Up @@ -237,4 +254,4 @@ tests:
VARIANCE:
hash: ec7b708609178533ac2b89cd575140415ef93c70396fa630d1c15b67
type: rasterhash

0 comments on commit 77786f3

Please sign in to comment.