2

I am trying to use the VRM tool in QGIS of the SAGA package. Every time I get an error message:

layers could not be generated.

I tried different input rasters (DEM and DTM) and kept other settings at default.

I do not understand what prevents a successful execution. Does someone understand from the corresponding processing message? (posted below).

2019-05-28T12:17:05     INFO    SAGA execution commands
io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/7cce3a0c93b844ffa51af442f7b8a0a1/DTMclipped.sgrd" -FILES "M:/My Documents/Thesis/QGIS/GB 2. Component/DTM_clipped.tif"
ta_morphometry "Vector Ruggedness Measure (VRM)" -DEM "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/7cce3a0c93b844ffa51af442f7b8a0a1/DTMclipped.sgrd" -RADIUS 1 -DISTANCE_WEIGHTING_DW_WEIGHTING 0 -DISTANCE_WEIGHTING_DW_IDW_POWER 1 -DISTANCE_WEIGHTING_DW_IDW_OFFSET true -DISTANCE_WEIGHTING_DW_BANDWIDTH 1 -VRM "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/0848e6b2437c4f7ebd32a4439d38f1da/VRM.sdat"

2019-05-28T12:17:18     INFO    SAGA execution console output

M:\My Documents\Thesis\QGIS>set SAGA=C:/PROGRA~1/QGIS3~1.4/apps\saga-ltr

M:\My Documents\Thesis\QGIS>set SAGA_MLB=C:/PROGRA~1/QGIS3~1.4/apps\saga-ltr\modules

M:\My Documents\Thesis\QGIS>PATH=C:\PROGRA~1\QGIS3~1.4\apps\qgis\bin;C:\PROGRA~1\QGIS3~1.4\apps\Python37;C:\PROGRA~1\QGIS3~1.4\apps\Python37\Scripts;C:\PROGRA~1\QGIS3~1.4\apps\qt5\bin;C:\PROGRA~1\QGIS3~1.4\apps\Python27\Scripts;C:\PROGRA~1\QGIS3~1.4\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32\WBem;C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\pywin32_system32;C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\numpy\.libs;C:/PROGRA~1/QGIS3~1.4/apps\saga-ltr;C:/PROGRA~1/QGIS3~1.4/apps\saga-ltr\modules

M:\My Documents\Thesis\QGIS>saga_cmd io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/7cce3a0c93b844ffa51af442f7b8a0a1/DTMclipped.sgrd" -FILES "M:/My Documents/Thesis/QGIS/GB 2. Component/DTM_clipped.tif"
Error: select a library
____________________________

##### ## ##### ##
### ### ## ###
### # ## ## #### # ##
### ##### ## # #####
##### # ## ##### # ##
____________________________

SAGA Version: 2.3.2 (64 bit)


68 loaded tool libraries (630 tools):
- climate_tools
- contrib_perego
- db_odbc
- db_pgsql
- docs_html
- garden_3d_viewer
- garden_fractals
- garden_games
- garden_learn_to_program
- garden_webservices
- grid_analysis
- grid_calculus
- grid_calculus_bsl
- grid_filter
- grid_gridding
- grid_spline
- grid_tools
- grid_visualisation
- imagery_classification
- imagery_isocluster
- imagery_maxent
- imagery_photogrammetry
- imagery_segmentation
- imagery_svm
- imagery_tools
- io_esri_e00
- io_gps
- io_grid
- io_grid_image
- io_shapes
- io_shapes_dxf
- io_table
- io_virtual
- pj_georeference
- pj_geotrans
- pj_proj4
- pointcloud_tools
- pointcloud_viewer
- shapes_grid
- shapes_lines
- shapes_points
- shapes_polygons
- shapes_tools
- shapes_transect
- sim_cellular_automata
- sim_ecosystems_hugget
- sim_erosion
- sim_fire_spreading
- sim_hydrology
- sim_ihacres
- sim_qm_of_esp
- sim_rivflow
- statistics_grid
- statistics_kriging
- statistics_points
- statistics_regression
- ta_channels
- ta_compound
- ta_hydrology
- ta_lighting
- ta_morphometry
- ta_preprocessor
- ta_profiles
- ta_slope_stability
- table_calculus
- table_tools
- tin_tools
- tin_viewer

type -h or --help for further information


M:\My Documents\Thesis\QGIS>saga_cmd ta_morphometry "Vector Ruggedness Measure (VRM)" -DEM "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/7cce3a0c93b844ffa51af442f7b8a0a1/DTMclipped.sgrd" -RADIUS 1 -DISTANCE_WEIGHTING_DW_WEIGHTING 0 -DISTANCE_WEIGHTING_DW_IDW_POWER 1 -DISTANCE_WEIGHTING_DW_IDW_OFFSET true -DISTANCE_WEIGHTING_DW_BANDWIDTH 1 -VRM "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/0848e6b2437c4f7ebd32a4439d38f1da/VRM.sdat"
Error: input file [C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/7cce3a0c93b844ffa51af442f7b8a0a1/DTMclipped.sgrd]
Error: Elevation
____________________________

##### ## ##### ##
### ### ## ###
### # ## ## #### # ##
### ##### ## # #####
##### # ## ##### # ##
____________________________

SAGA Version: 2.3.2 (64 bit)

____________________________
library path: C:\PROGRA~1\QGIS3~1.4\apps\saga-ltr\modules\
library name: ta_morphometry
library : Morphometry
tool : Vector Ruggedness Measure (VRM)
author : O.Conrad (c) 2010
processors : 4 [4]
____________________________

Load grid: C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/7cce3a0c93b844ffa51af442f7b8a0a1/DTMclipped.sgrd...
failed

Usage: saga_cmd ta_morphometry 17 [-DEM ] [-VRM ] [-RADIUS ] [-DISTANCE_WEIGHTING_DW_WEIGHTING ] [-DISTANCE_WEIGHTING_DW_IDW_POWER ] [-DISTANCE_WEIGHTING_DW_IDW_OFFSET ] [-DISTANCE_WEIGHTING_DW_BANDWIDTH ]
-DEM: Elevation
Grid (input)
-VRM: Vector Terrain Ruggedness (VRM)
Grid (output)
-RADIUS: Radius (Cells)
Integer
Minimum: 1
Default: 1
-DISTANCE_WEIGHTING_DW_WEIGHTING: Weighting Function
Choice
Available Choices:
[0] no distance weighting
[1] inverse distance to a power
[2] exponential
[3] gaussian weighting
Default: 0
-DISTANCE_WEIGHTING_DW_IDW_POWER: Inverse Distance Weighting Power
Floating point
Minimum: 0.000000
Default: 1.000000
-DISTANCE_WEIGHTING_DW_IDW_OFFSET: Inverse Distance Offset
Boolean
Default: 1
-DISTANCE_WEIGHTING_DW_BANDWIDTH: Gaussian and Exponential Weighting Bandwidth
Floating point
Minimum: 0.000000
Default: 1.000000

M:\My Documents\Thesis\QGIS>exit

Output of the raster information tool (GDAL) for unclipped raster-layer:

Driver: GTiff/GeoTIFF
Files: M:/My Documents/Thesis/QGIS/DTM BCI/DTM BCI.0.tif
Size is 6237, 5934
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-79.872178571999996,9.184899589000000)
Pixel Size = (0.000009129413981,-0.000009129413981)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -79.8721786,   9.1848996) ( 79d52'19.84"W,  9d11' 5.64"N)
Lower Left  ( -79.8721786,   9.1307256) ( 79d52'19.84"W,  9d 7'50.61"N)
Upper Right ( -79.8152384,   9.1848996) ( 79d48'54.86"W,  9d11' 5.64"N)
Lower Right ( -79.8152384,   9.1307256) ( 79d48'54.86"W,  9d 7'50.61"N)
Center      ( -79.8437085,   9.1578126) ( 79d50'37.35"W,  9d 9'28.13"N)
Band 1 Block=6237x1 Type=Float32, ColorInterp=Gray
  NoData Value=-3.40282306073709653e+38

(Same) Error message with provided random field raster:

2019-05-28T16:28:01     INFO    SAGA execution commands
             io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/d9304422daef400faefadb04919e204d/RandomField.sgrd" -FILES "C:/Users/mulde102/Downloads/Random Field.tif"
             ta_morphometry "Vector Ruggedness Measure (VRM)" -DEM "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/d9304422daef400faefadb04919e204d/RandomField.sgrd" -RADIUS 1 -DISTANCE_WEIGHTING_DW_WEIGHTING 0 -DISTANCE_WEIGHTING_DW_IDW_POWER 1 -DISTANCE_WEIGHTING_DW_IDW_OFFSET true -DISTANCE_WEIGHTING_DW_BANDWIDTH 1 -VRM "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/210e8795967448d38bc2e0cf0fd31c13/VRM.sdat"
2019-05-28T16:28:14     INFO    SAGA execution console output

             M:\My Documents\Thesis\QGIS>set SAGA=C:/PROGRA~1/QGIS3~1.4/apps\saga-ltr

             M:\My Documents\Thesis\QGIS>set SAGA_MLB=C:/PROGRA~1/QGIS3~1.4/apps\saga-ltr\modules

             M:\My Documents\Thesis\QGIS>PATH=C:\PROGRA~1\QGIS3~1.4\apps\qgis\bin;C:\PROGRA~1\QGIS3~1.4\apps\Python37;C:\PROGRA~1\QGIS3~1.4\apps\Python37\Scripts;C:\PROGRA~1\QGIS3~1.4\apps\qt5\bin;C:\PROGRA~1\QGIS3~1.4\apps\Python27\Scripts;C:\PROGRA~1\QGIS3~1.4\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32\WBem;C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\pywin32_system32;C:\PROGRA~1\QGIS3~1.4\apps\Python37\lib\site-packages\numpy\.libs;;C:/PROGRA~1/QGIS3~1.4/apps\saga-ltr;C:/PROGRA~1/QGIS3~1.4/apps\saga-ltr\modules

             M:\My Documents\Thesis\QGIS>saga_cmd io_gdal 0 -TRANSFORM 1 -RESAMPLING 3 -GRIDS "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/d9304422daef400faefadb04919e204d/RandomField.sgrd" -FILES "C:/Users/mulde102/Downloads/Random Field.tif"
             Error: select a library
             ____________________________

             ##### ## ##### ##
             ### ### ## ###
             ### # ## ## #### # ##
             ### ##### ## # #####
             ##### # ## ##### # ##
             ____________________________

             SAGA Version: 2.3.2 (64 bit)


             68 loaded tool libraries (630 tools):
             - climate_tools
             - contrib_perego
             - db_odbc
             - db_pgsql
             - docs_html
             - garden_3d_viewer
             - garden_fractals
             - garden_games
             - garden_learn_to_program
             - garden_webservices
             - grid_analysis
             - grid_calculus
             - grid_calculus_bsl
             - grid_filter
             - grid_gridding
             - grid_spline
             - grid_tools
             - grid_visualisation
             - imagery_classification
             - imagery_isocluster
             - imagery_maxent
             - imagery_photogrammetry
             - imagery_segmentation
             - imagery_svm
             - imagery_tools
             - io_esri_e00
             - io_gps
             - io_grid
             - io_grid_image
             - io_shapes
             - io_shapes_dxf
             - io_table
             - io_virtual
             - pj_georeference
             - pj_geotrans
             - pj_proj4
             - pointcloud_tools
             - pointcloud_viewer
             - shapes_grid
             - shapes_lines
             - shapes_points
             - shapes_polygons
             - shapes_tools
             - shapes_transect
             - sim_cellular_automata
             - sim_ecosystems_hugget
             - sim_erosion
             - sim_fire_spreading
             - sim_hydrology
             - sim_ihacres
             - sim_qm_of_esp
             - sim_rivflow
             - statistics_grid
             - statistics_kriging
             - statistics_points
             - statistics_regression
             - ta_channels
             - ta_compound
             - ta_hydrology
             - ta_lighting
             - ta_morphometry
             - ta_preprocessor
             - ta_profiles
             - ta_slope_stability
             - table_calculus
             - table_tools
             - tin_tools
             - tin_viewer

             type -h or --help for further information


             M:\My Documents\Thesis\QGIS>saga_cmd ta_morphometry "Vector Ruggedness Measure (VRM)" -DEM "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/d9304422daef400faefadb04919e204d/RandomField.sgrd" -RADIUS 1 -DISTANCE_WEIGHTING_DW_WEIGHTING 0 -DISTANCE_WEIGHTING_DW_IDW_POWER 1 -DISTANCE_WEIGHTING_DW_IDW_OFFSET true -DISTANCE_WEIGHTING_DW_BANDWIDTH 1 -VRM "C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/210e8795967448d38bc2e0cf0fd31c13/VRM.sdat"
             Error: input file [C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/d9304422daef400faefadb04919e204d/RandomField.sgrd]
             Error: Elevation
             ____________________________

             ##### ## ##### ##
             ### ### ## ###
             ### # ## ## #### # ##
             ### ##### ## # #####
             ##### # ## ##### # ##
             ____________________________

             SAGA Version: 2.3.2 (64 bit)

             ____________________________
             library path: C:\PROGRA~1\QGIS3~1.4\apps\saga-ltr\modules\
             library name: ta_morphometry
             library : Morphometry
             tool : Vector Ruggedness Measure (VRM)
             author : O.Conrad (c) 2010
             processors : 4 [4]
             ____________________________

             Load grid: C:/Users/mulde102/AppData/Local/Temp/processing_5d8acc41c42e42c1ab181dc9a53dfd41/d9304422daef400faefadb04919e204d/RandomField.sgrd...
             failed

             Usage: saga_cmd ta_morphometry 17 [-DEM ] [-VRM ] [-RADIUS ] [-DISTANCE_WEIGHTING_DW_WEIGHTING ] [-DISTANCE_WEIGHTING_DW_IDW_POWER ] [-DISTANCE_WEIGHTING_DW_IDW_OFFSET ] [-DISTANCE_WEIGHTING_DW_BANDWIDTH ]
             -DEM: Elevation
             Grid (input)
             -VRM: Vector Terrain Ruggedness (VRM)
             Grid (output)
             -RADIUS: Radius (Cells)
             Integer
             Minimum: 1
             Default: 1
             -DISTANCE_WEIGHTING_DW_WEIGHTING: Weighting Function
             Choice
             Available Choices:
             [0] no distance weighting
             [1] inverse distance to a power
             [2] exponential
             [3] gaussian weighting
             Default: 0
             -DISTANCE_WEIGHTING_DW_IDW_POWER: Inverse Distance Weighting Power
             Floating point
             Minimum: 0.000000
             Default: 1.000000
             -DISTANCE_WEIGHTING_DW_IDW_OFFSET: Inverse Distance Offset
             Boolean
             Default: 1
             -DISTANCE_WEIGHTING_DW_BANDWIDTH: Gaussian and Exponential Weighting Bandwidth
             Floating point
             Minimum: 0.000000
             Default: 1.000000

             M:\My Documents\Thesis\QGIS>exit
  • This tool works fine in my QGIS 3.4/3.6 on Windows. And it works on rasters either geographical (eg WGS84) or projected (xy). Could you post your raster information? – Kazuhito May 28 at 12:05
  • I use QGIS 3.4.3. The raster information is: CRS: EPSG:5467 - Panama-Colon 1911 - Geographic, Data type: Float32, GDAL Driver Metadata: GeoTIFF – Andrea May 28 at 12:17
  • on account of your comment, I now also tried the VRM tool after saving my raster in CRS EPSG:4326 - WGS 84 - Geographic, to see if the CRS made the difference. Unfortunately I get the same error. – Andrea May 28 at 12:22
  • To be more specific: Could you add output from Raster information tool (Processing Toolbox > GDAL > Raster miscellaneous)? It may also help to understand if you run VRM on your original raster before clipping (provided your filename indicates the file was clipped). – Kazuhito May 28 at 12:36
  • Thank you for explaining about the tool. I have edited the post to include the Raster information tool output, of the unclipped raster layer. (I have also tried the VRM on the unclipped layer). – Andrea May 28 at 12:59

Your Answer

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

Browse other questions tagged or ask your own question.