I have an issue when I am creating a DEM with the tool natural neighbour on QGIS.

When I extract my data directly on Qgis I have no issue creating a DEM. My points are coming from different sources and I need to join them all together.

When I use the tool Union and then create my DEM with those points I have the following error message:

error message from Qgis I don't know what it means and I tried to save the points directly on C: with no space.

It seems to be a minor issue but can't find a solution

  • Hi, could you please post the screenshot of the Parameters tab? That would help others to identify possible trouble-makers in the settings :) – RafDouglas May 15 '19 at 16:47
  • Also, a screenshot of the table with the values of the points would be helpful. From the Log output it seems that all points are valued "0" (see Maximum: 0.000000) – RafDouglas May 15 '19 at 16:49
  • Please always provide errors as formatted text rather than pictures. – PolyGeo May 21 '19 at 23:23

As the comment above said, it would be helpful for a full screenshot of the parameters tab.

Here is the online docs page for SAGA: Nearest Neighbour

Here is a code example of how to use the Saga: Nearest Neighbour tool. I don't know why but tools often work better when running them in a script or in the python console. I have noticed this using SAGA, GDAL, and Native processing tools.

To get started, you can always ask for help on the tool you are using like this:

processing.algorithmHelp('saga:nearestneighbour')   #prints help docs in console

The algorithmHelp method gives clear instructions about what the tool is looking for, for each input box.

When you run the nearest neighbour tool widget, in the 'log' tab you will get the python code that QGIS used for all your parameters, so you can use that to populate your parameters in python. You'll have to modify my code slightly to match your file pathnames for SHAPES and TARGET_OUT_GRID, as well as FIELD which is the field name in your attribute table.

import processing    

parameters = {'SHAPES': '/Users/ep9k/Desktop/RandomPoints.gpkg',
        'FIELD': 'ELEVATION',
        'TARGET_USER_FITS': 0,
        'TARGET_OUT_GRID': '/Users/ep9k/Desktop/Output.sdat'}

processing.runAndLoadResults('saga:nearestneighbour', parameters)

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.