2

I am looking for an example of how to mosaik DEMs together using the SAGA command line. Specifically, how to indicate the list of DEMs that you want to merge.

I found

saga_cmd grid_tools 3 -GRIDS <str> [-TYPE <str>] [-INTERPOL <str>] [-OVERLAP <str>] [-BLEND_DIST <str>] [-MATCH <str>] [-TARGET_DEFINITION <str>] [-TARGET_USER_XMIN <str>] [-TARGET_USER_XMAX <str>] [-TARGET_USER_YMIN <str>] [-TARGET_USER_YMAX <str>] [-TARGET_USER_SIZE <str>] [-TARGET_USER_FITS <str>] [-TARGET_TEMPLATE <str>] [-TARGET_OUT_GRID <str>]

however cannot figure out how to give the list of filenames

I tried

saga_cmd grid_tools 3 -GRIDS ["R1.tif", "R2.tif", "R3.tif"] -TARGET_OUT_GRID "test.sdat" 

but this gives the error zsh: bad pattern: [R1.tif,

I have called the module from within QGIS to try copy that formatting, however that is not working (QGIS isn't working properly right now)

3
  • You specifically want to use the SAGA command line or using pyqgis is fine too ?
    – wanderzen
    May 17 at 8:42
  • @wanderzen saga_cmd is all I have working reliably at the moment
    – Esme_
    11 hours ago
  • Are the 'Processing Saga NextGen Provider' AND 'SAGA GIS provider' installed and checked within your Plugins Repository ?
    – wanderzen
    10 hours ago

1 Answer 1

2

Have you tried separating them by ;?

saga_cmd grid_tools 3 -GRIDS "R1.tif;R2.tif;R3.tif" -TARGET_OUT_GRID "test.sdat"

enter image description here

Image and documentation found here.

1
  • I had tried ; instead of , but I had the format wrong with brackets and quotes around each file.
    – Esme_
    11 hours ago

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.