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)

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

1 Answer 1


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.

  • I had tried ; instead of , but I had the format wrong with brackets and quotes around each file.
    – Esme_
    Commented May 20, 2022 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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