SAGA_CMD(1)

✨ NAME ✨

saga_cmd β€” command-line interface to the System for Automated Geoscientific Analyses πŸ’–

okay bestie, you asked what this manual page is and honestly? it's SAGA_CMD(1), the iconic little doorway into SAGA GIS from your terminal. let's get into it 🫢


🌸 SYNOPSIS 🌸

saga_cmd [-d, --docs]
saga_cmd [-b, --batch]
saga_cmd [-h, --help]
saga_cmd [-f, --flags][=qrsilpxo][-s, --story][=#][-c, --cores][=#] LIBRARY [MODULE] <module specific options...>
saga_cmd [-f, --flags][=qrsilpxo][-s, --story][=#][-c, --cores][=#] SCRIPT

like. it's giving "five different ways to call me and I'm serving in all of them" πŸ’…


πŸ’– DESCRIPTION πŸ’–

SAGA GIS β€” that's the System for Automated Geoscientific Analysis β€” is a free and open source geographic information system, and it's literally built for editing and analysing spatial data. it comes with a HUGE number of modules for analysing vector, table, grid and image data. no cap, it's a lot of modules. 🌈

The SAGA command line interpreter is particularly useful for processing complex work flows, because you can define a whole series of subsequent tool calls in a script file. so you write it once, it runs every time, main character energy fr fr. and if you call saga_cmd with the option -b or --batch, it'll create an example of a DOS batch script file for you β€” which is genuinely a great starting point for building your own specific work flows. ✨

When you run it with no arguments at all? it lists the module libraries in the current module library. by default that's the directory that was set at installation, which is /usr/lib/saga. but you can overwrite that by setting the environment variable SAGA_MLB. simple as. πŸŽ€


πŸŽ€ OPTIONS πŸŽ€

  • [SAGA_MLB=dirname] β€” Module libraries are expected to live in the directory you specify with the environment variable SAGA_MLB. if that's not found, then the module installation directory (/usr/lib/saga) gets searched instead. so like, it has a backup plan. queen behavior. πŸ‘‘
  • LIBRARY [MODULE] [MODULE OPTIONS] β€” tell it the library (think ta_morphometry) and the module (by number or by name). if you don't specify a module, it just lists the different modules inside that library. that's it, that's the whole vibe check. πŸ¦‹
  • -h, --help β€” Display help and exit. your little get-out-of-jail-free card πŸ’–
  • -d, --docs β€” Create tool documentation in the current working directory. πŸ“
  • -b, --batch β€” Create batch file examples in the current working directory. πŸ“‚
  • -c, --cores β€” Number of physical processors to use for computation. give it the cores, bestie, let it cook πŸ”₯
  • -f, --flags β€” Various flags for general usage [qrsilpxo]. and here's the whole alphabet of them, sliced and served:
    • q β€” No progress report 🀫
    • r β€” No messages report 🀐
    • s β€” Silent mode (no progress and no messages report) 🀐🀫
    • i β€” Allow user interaction πŸ—£οΈ
    • l β€” Load translation dictionary πŸ“–
    • p β€” Load projections dictionary πŸ—ΊοΈ
    • x β€” Use XML markups for synopses and messages 🏷️
    • o β€” Load old style naming πŸ•°οΈ

🌈 EXAMPLE 🌈

first, set the environment variable, bestie:

export SAGA_MLB=/usr/lib/saga

then run a module, like so:

saga_cmd ta_morphometry "Local Morphometry" -ELEVATION dem.sgrd -SLOPE slope.sgrd -ASPECT aspect.sgrd -METHOD 1

Multiple input files can be specified by separating them by a semicolon (;). the way that a single semicolon can just feed in multiple entire files?? obsessed. πŸ’…

saga_cmd libgrid_tools Merging -GRIDS test1.sgrd\;test2.sgrd -GRID_TARGET merged.sgrd
notice the \; in there β€” escape that semicolon so the shell doesn't snatch it out of your command, bestie 😭 she's shy, she needs the backslash

πŸ’€ BUGS πŸ’€

On the website of http://www.saga-gis.org, a list of known bugs can be found, and new bug reports can be submitted. so if you found a lil gremlin, go tattle on it there πŸ›πŸ™ˆ


πŸ‘‘ AUTHORS πŸ‘‘

SAGA was written by Olaf Conrad with help from a large number of contributors. this manual page was written by Johan Van de Wauw. This manual is released under the GNU Lesser General Public License v2.1. The SAGA API uses the same license, however most of SAGA itself uses the GNU General Public License 2 or higher. (license lore, but make it legal ✨)

More info: http://www.saga-gis.org

Please provide the following reference in your work if you are using SAGA β€” yes it's a whole citation, yes you have to do it, iykyk:

Conrad, O., Bechtel, B., Bock, M., Dietrich, H., Fischer, E., Gerlitz,
L., Wehberg, J., Wichmann, V., and Boehner, J. (2015): System for
Automated Geoscientific Analyses (SAGA) v. 2.1.4.  Geosci. Model Dev.,
8, 1991-2007, doi:10.5194/gmd-8-1991-2015.

http://www.geosci-model-dev.net/8/1991/2015/gmd-8-1991-2015.html


and that's the whole page, bestie 🫢 this one's version 9.9.3, dated 2026-06-27, and it's the SAGA_CMD(1) manual β€” now go run some modules and slay πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from