4

I encountered an error while using the "Add raster value to point" SAGA-GIS module in QGIS (2.16) to retrieve altitude values from a raster DEM previously interpolated from TIN points (as vector features).

I use SAGA-GIS version 2.3.1.

This bug is fully reproducible for me.

I've selected an other points layer in the first field of the module window.
The raster DEM in the the second field.
The interpolation method was set to "[0] Nearest neighbor".
File saved to /temp
[x] Open output file after running algorithm.

Here is the log:
http://pastebin.com/raw/1F5NGz8b

The same operations are working on SAGA's side.

2

The fact is that the "saga_cmd io_gdal" command makes use of these options as you can see in the previously pasted output:

0 [-GRIDS ] [-FILES ] [-SELECTION ] [-SELECT_SORT ] [-TRANSFORM ] [-RESAMPLING ]

With:

-RESAMPLING: Resampling
Choice
Available Choices:
[0] Nearest Neighbour
[1] Bilinear Interpolation
[2] Bicubic Spline Interpolation
[3] B-Spline Interpolation
Default: 3
Unknown option 'INTERPOL'
___________________________

So, the 'INTERPOL' value seems to be now called 'RESAMPLING'.

The exactly same behavior exists for the "saga_cmd shapes_grid" command options:

0 [-SHAPES ] [-GRIDS ] [-RESULT ] [-RESAMPLING ]

With:

-RESAMPLING: Resampling
Choice
Available Choices:
[0] Nearest Neighbour
[1] Bilinear Interpolation
[2] Bicubic Spline Interpolation
[3] B-Spline Interpolation
Default: 3
___________________________

Also here, there is no 'INTERPOL' value but a 'RESAMPLING' one. Anyway, this one doesn't seem to be problematic, but within the QGIS module, the user cannot set this one.

AND: the 'RESULTS' flag it now 'RESULT' (without ending 'S').

I do not know how to fix this, buy AFAIK every useful information is here. Thanks.

  • 1
    I am encountering the same problem on Qgis 2.18.8 on Windows 10 - I cant add grid values to points (single or multi feature). The log message gives this hint Unknown option 'INTERPOL'. I do not know how to fix it. I guess it should be a bug report! – Konstantin_o May 25 '17 at 13:17
2

In ubunut go to /usr/share/qgis/python/plugins/processing/algs/saga/ (your location may vary). Open the SagaAlgorithm214.py file and find and replace INTERPOL with RESAMPLING

See the link for more details

  • This helped, but I also had to replace INTERPOL with RESAMPLING in the C:\Program Files (x86)\QGIS 2.14\apps\qgis-ltr\python\plugins\processing\algs\saga\description\2.3.0\AddGridValuestoPoints.txt file. I did it in AddGridValuestoShapes.txt, while I was there, and updated some older versions of SAGA, too, just in case. – snow-raven Dec 5 '17 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.