<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tutorials &#8211; SAGA GIS</title>
	<atom:link href="https://sagagis.net/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>https://sagagis.net</link>
	<description>Open-Source Geoprocessing &#38; Terrain Analysis</description>
	<lastBuildDate>Wed, 21 Oct 2026 07:30:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>

<image>
	<url>https://sagagis.net/wp-content/uploads/2026/04/favicon-150x150.png</url>
	<title>Tutorials &#8211; SAGA GIS</title>
	<link>https://sagagis.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Kriging in SAGA GIS: Ordinary &#038; Universal Kriging Basics</title>
		<link>https://sagagis.net/kriging-in-saga-gis/</link>
					<comments>https://sagagis.net/kriging-in-saga-gis/#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 21 Oct 2026 07:30:42 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://sagagis.net/kriging-in-saga-gis/</guid>

					<description><![CDATA[You have measurements at points — rain gauges, soil samples, boreholes, survey plots — and you need a surface. Kriging is the geostatistical way to build that surface: instead of assuming nearby points are simply similar, it models how similarity decays with distance, and uses that model both to interpolate and to say how uncertain...]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">You have measurements at points — rain gauges, soil samples, boreholes, survey plots — and you need a surface. Kriging is the geostatistical way to build that surface: instead of assuming nearby points are simply similar, it models <em>how</em> similarity decays with distance, and uses that model both to interpolate and to say how uncertain the interpolation is. SAGA GIS carries a dedicated kriging library in its Spatial &amp; Geostatistics family. This page explains the concept, the exact tools SAGA&#8217;s official documentation lists, and how to choose between kriging and its simpler rivals.</p>



<h2 class="wp-block-heading">Kriging in one paragraph</h2>



<p class="wp-block-paragraph">Every interpolation guesses unsampled values from sampled ones. Inverse-distance methods guess with a fixed rule: nearer points weigh more. Kriging replaces the fixed rule with a fitted one. First you study the data&#8217;s spatial structure — how the variance between point pairs grows as the pairs get farther apart — which is summarised in a <em>variogram</em>. Then, for each unsampled location, kriging solves for the set of weights that gives the best linear unbiased estimate under that structure. Two consequences matter practically: clustered samples are automatically down-weighted relative to isolated ones (the geometry is in the maths), and the method produces an error estimate alongside the prediction — a map of where your surface is trustworthy and where it is a polite guess.</p>



<h2 class="wp-block-heading">What SAGA actually ships</h2>



<p class="wp-block-paragraph">SAGA&#8217;s Spatial and Geostatistics – Kriging library contains seven tools in the official 9.12.0 documentation: <strong>Ordinary Kriging</strong>, <strong>Ordinary Kriging (3D)</strong>, <strong>Simple Kriging</strong>, <strong>Simple Kriging (3D)</strong>, <strong>Universal Kriging</strong>, <strong>Regression Kriging</strong>, and a <strong>Variogram (Dialog)</strong> tool. Ordinary and universal are the pair most users need; the others serve known-mean situations (simple), volumetric data (the 3D variants), and trend-plus-residual modelling (regression kriging).</p>



<p class="wp-block-paragraph">The documentation for <strong>Ordinary Kriging</strong> (O. Conrad, 2008) describes &#8220;Ordinary Kriging for grid interpolation from irregular sample points.&#8221; Its inputs are a points layer and the attribute field holding your measured values; its target is a grid you define by extent and cell size (or borrow from an existing grid&#8217;s system). Its outputs are the point of the exercise: a <strong>Prediction</strong> grid, an optional <strong>Prediction Error</strong> (variance) grid, and optional cross-validation outputs — a summary table and a residuals layer — so you can validate the surface against the very points that built it. <strong>Universal Kriging</strong> has the same skeleton, plus one addition that defines it: an optional list of predictor grids, letting the surface follow a regional trend carried by covariates (elevation being the classic one for climate variables) while the kriging handles the spatial residual.</p>



<p class="wp-block-paragraph">The <strong>Variogram (Dialog)</strong> tool is where the method&#8217;s honesty is built. It takes your points and attribute and produces a variogram table — with options including a logarithmic transformation of the values and the number of lag-distance classes — and accepts a variogram model, so the spatial structure feeding the kriging tools is one you have actually looked at, not a default you never questioned.</p>



<h2 class="wp-block-heading">A sensible first kriging workflow</h2>



<ol class="wp-block-list"><li><strong>Prepare the points.</strong> One points layer, one numeric attribute with the measured values, in a projected coordinate system. Remove duplicates and obvious blunders first — kriging will faithfully interpolate your data-entry errors.</li><li><strong>Look at the variogram.</strong> Run the Variogram tool and check that similarity really does decay with distance in your data, and over roughly what range. If it does not, no kriging variant will save the surface.</li><li><strong>Start with Ordinary Kriging.</strong> Set the target grid to your study extent at a cell size sensible for your sample spacing, request the Prediction Error grid, and turn on cross-validation.</li><li><strong>Read both maps.</strong> Judge the prediction together with its error: high-error zones are where more sampling would pay, and where conclusions should be stated softly.</li><li><strong>Graduate to Universal Kriging only with a reason</strong> — a visible regional trend and a predictor grid that plausibly drives it.</li></ol>



<h2 class="wp-block-heading">Mistakes that ruin a first kriging surface</h2>



<p class="wp-block-paragraph">Three are worth naming. <strong>Ignoring the error grid:</strong> a kriging prediction published without its companion variance map hides exactly the information that makes kriging worth doing. <strong>A cell size divorced from the sampling:</strong> a target grid far finer than your point spacing does not add detail — it adds smooth, confident-looking fiction between distant samples, which the error grid will quietly confess. Match the grid to the data&#8217;s real support. <strong>Skipping cross-validation:</strong> both kriging tools can produce cross-validation summaries and residuals from your own points; if those residuals show large, patterned errors, the variogram model — not the software — is where the problem lives. Treat the first surface as a hypothesis the validation outputs get to vote on.</p>



<h2 class="wp-block-heading">Kriging, IDW or splines?</h2>



<p class="wp-block-paragraph">SAGA offers the alternatives side by side, and all three are named in the project&#8217;s own feature descriptions. <strong>Inverse Distance Weighted</strong> interpolation (in the Grid Tools gridding library) is the quick draft: no structure to fit, no error map, fine for a first look or very dense data. The <strong>Spline Interpolation</strong> library — whose documentation singles out Multilevel B-Spline as the optimal choice in most cases — fits a smooth mathematical surface through the data; it excels at smoothly varying phenomena like elevation from dense samples, but can overshoot between sparse points and says nothing about uncertainty. <strong>Kriging</strong> is the choice when the sampling is irregular or sparse, when the audience will ask &#8220;how sure are you?&#8221;, and when the phenomenon has spatial structure worth modelling — soil properties, precipitation, ore grades, pollutant concentrations. The price is effort: a variogram to examine and assumptions to defend. For a throwaway map, IDW. For a defensible surface, kriging.</p>



<p class="wp-block-paragraph">Kriging sits naturally in scripted work, too: like every SAGA tool it is callable from <a href="/saga-cmd/">saga_cmd</a>, and the R route via <a href="/rsaga/">RSAGA and Rsagacmd</a> is popular with the geostatistics crowd. If you are still finding your feet in the program, our <a href="/how-to-use-saga-gis/">beginner&#8217;s guided tour</a> covers loading point data and running your first tools.</p>

]]></content:encoded>
					
					<wfw:commentRss>https://sagagis.net/kriging-in-saga-gis/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Slope, Aspect &#038; Curvature in SAGA GIS (ta_morphometry)</title>
		<link>https://sagagis.net/slope-aspect-curvature/</link>
					<comments>https://sagagis.net/slope-aspect-curvature/#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 21 Oct 2026 07:30:08 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://sagagis.net/slope-aspect-curvature/</guid>

					<description><![CDATA[Slope, aspect and curvature are the first derivatives of terrain — the three grids almost every DEM analysis starts from. In SAGA GIS they come from a single, well-documented tool: Slope, Aspect, Curvature, tool 0 of the Terrain Analysis – Morphometry library (ta_morphometry). This page walks through the tool in the graphical interface, shows the...]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Slope, aspect and curvature are the first derivatives of terrain — the three grids almost every DEM analysis starts from. In SAGA GIS they come from a single, well-documented tool: <strong>Slope, Aspect, Curvature</strong>, tool 0 of the Terrain Analysis – Morphometry library (<code>ta_morphometry</code>). This page walks through the tool in the graphical interface, shows the identical analysis as a <code>saga_cmd</code> call using the invocation printed in SAGA&#8217;s official 9.12.0 tool documentation, and explains how to read each output.</p>



<h2 class="wp-block-heading">What the tool computes</h2>



<p class="wp-block-paragraph">Feed the tool an elevation grid and it derives, for every cell, the steepness of the surface (slope), the compass direction the surface faces (aspect), and — depending on the method chosen — a family of curvature grids describing how the surface bends. The tool&#8217;s documented parameters name the outputs directly: <code>SLOPE</code> and <code>ASPECT</code> are the primary results, and optional outputs include general, profile, plan, tangential, longitudinal and cross-sectional curvature (the <code>C_GENE</code>, <code>C_PROF</code>, <code>C_PLAN</code>, <code>C_TANG</code>, <code>C_LONG</code> and <code>C_CROS</code> parameters in the documentation).</p>



<p class="wp-block-paragraph">The calculation method is a documented choice, not a black box. The <code>METHOD</code> parameter offers nine methods (choices 0–8) and defaults to <strong>6: the 9-parameter 2nd-order polynomial of Zevenbergen &amp; Thorne (1987)</strong>, a long-standing standard for this kind of local surface fit. Unless you are reproducing a study that names a different method, the default is the right starting point — and whichever method you use, cite it: slope values from different algorithms are not interchangeable.</p>



<h2 class="wp-block-heading">In the graphical interface</h2>



<p class="wp-block-paragraph">Load your DEM first (if it is in SAGA&#8217;s native format, open the <code>.sgrd</code> file — see our <a href="/sgrd-sdat-files/">guide to SAGA grid formats</a>). Then open the tool from the Terrain Analysis – Morphometry library and set the parameters:</p>



<ul class="wp-block-list"><li><strong>Elevation</strong> — your DEM grid.</li><li><strong>Slope / Aspect</strong> — the output grids to create. Curvature outputs can be requested in the same run.</li><li><strong>Method</strong> — leave at the default (6, Zevenbergen &amp; Thorne) unless you have a reason to change it.</li><li><strong>Slope unit</strong> — the <code>UNIT_SLOPE</code> parameter: 0 = radians (the default), 1 = degree, 2 = percent rise. Most readers of terrain maps think in degrees, so switch to 1 for display grids.</li><li><strong>Aspect unit</strong> — <code>UNIT_ASPECT</code>: 0 = radians (default), 1 = degree.</li></ul>



<p class="wp-block-paragraph">Run the tool and add the results to a map. One precondition matters more than any setting: your DEM must be in a projected coordinate system whose units match its elevation units. Slope is a ratio of vertical change to horizontal distance; a DEM stored in geographic degrees makes that ratio meaningless, and no method choice will rescue it.</p>



<h2 class="wp-block-heading">The same analysis with saga_cmd</h2>



<p class="wp-block-paragraph">Everything the dialog does can be scripted. The command line below reproduces the tool&#8217;s documented usage from the official 9.12.0 documentation page for <code>ta_morphometry</code> tool 0 — slope and aspect in degrees, using the default method:</p>



<pre class="wp-block-code"><code>saga_cmd ta_morphometry 0 -ELEVATION=dem.sgrd -SLOPE=slope.sgrd -ASPECT=aspect.sgrd -METHOD=6 -UNIT_SLOPE=1 -UNIT_ASPECT=1</code></pre>



<p class="wp-block-paragraph">The pattern is the same one every SAGA tool follows: library, tool number, then <code>-PARAMETER=value</code> pairs. Our <a href="/saga-cmd/">saga_cmd guide</a> explains how to read any tool&#8217;s full parameter list from the command line itself, so you can build calls like this for the whole library without guesswork.</p>



<h2 class="wp-block-heading">Reading the outputs</h2>



<p class="wp-block-paragraph"><strong>Slope</strong> is the maximum rate of change of elevation at each cell, expressed in the unit you chose. In degrees, 0 is flat, values in the 30s are steep hillsides, and anything past about 45 deserves a second look at your data. In percent rise, the same terrain reads as rise over run × 100 — the scale road engineers use, where 100% is a 45° slope. Radians are what most downstream formulas expect, which is why they are the default.</p>



<p class="wp-block-paragraph"><strong>Aspect</strong> is the direction the slope faces, measured in degrees from north and increasing clockwise when you output degrees: 0 is a north-facing slope, 90 east, 180 south, 270 west. Aspect is circular, which trips up statistics — the average of 350° and 10° is not 180°. Treat perfectly flat cells with care too: a cell with no slope has no meaningful facing direction, whatever value the grid stores there.</p>



<p class="wp-block-paragraph"><strong>Curvature</strong> grids describe the shape of the surface rather than its tilt. Profile curvature (along the fall line) relates to how flow accelerates or decelerates; plan curvature (across the slope) relates to whether flow converges or diverges; general curvature summarises the overall bending. Signs depend on the convention of the method used, so read the tool documentation for the method you ran before interpreting positive and negative values — and remember curvature is a second derivative, which makes it far more sensitive to noise and cell size than slope. A curvature map from a coarse or noisy DEM will show the noise beautifully.</p>



<h2 class="wp-block-heading">A note on cell size</h2>



<p class="wp-block-paragraph">Slope and curvature are scale-dependent measurements, and this tool makes that easy to forget because it will happily run on any grid you give it. The same hillside measured from a 1 m LiDAR DEM and from a 30 m satellite DEM returns different slope statistics — the coarser grid has averaged away the small steep faces. Neither answer is wrong; they describe the terrain at different scales. What is wrong is comparing them as if they were the same measurement. Record the DEM source and cell size alongside the method and unit in your notes or methods section, every time.</p>



<h2 class="wp-block-heading">Where these grids lead</h2>



<p class="wp-block-paragraph">Slope and aspect feed directly into solar-radiation and lighting analyses, erosion models and site-suitability work, and they are inputs or close cousins of the hydrology workflow: the <a href="/topographic-wetness-index/">Topographic Wetness Index</a> combines slope with catchment area, and <a href="/watershed-delineation/">watershed delineation</a> starts from the same DEM discipline practised here. If this is your first SAGA analysis, our <a href="/how-to-use-saga-gis/">beginner&#8217;s guided tour</a> shows where this tool sits in the wider program.</p>

]]></content:encoded>
					
					<wfw:commentRss>https://sagagis.net/slope-aspect-curvature/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Watershed Delineation in SAGA GIS: From DEM to Catchment</title>
		<link>https://sagagis.net/watershed-delineation/</link>
					<comments>https://sagagis.net/watershed-delineation/#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 21 Oct 2026 07:29:56 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://sagagis.net/watershed-delineation/</guid>

					<description><![CDATA[Delineating a watershed from a DEM is the canonical SAGA GIS workflow — the task its hydrology libraries were built around. It is also a chain, not a single tool: each stage consumes the previous stage&#8217;s output, and most failed delineations are really a failed early stage discovered late. This page walks the chain in...]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Delineating a watershed from a DEM is the canonical SAGA GIS workflow — the task its hydrology libraries were built around. It is also a chain, not a single tool: each stage consumes the previous stage&#8217;s output, and most failed delineations are really a failed early stage discovered late. This page walks the chain in order, naming the tools exactly as SAGA&#8217;s official 9.12.0 tool documentation names them, with the inputs and outputs of each stage.</p>



<h2 class="wp-block-heading">Before the chain: a DEM worth routing</h2>



<p class="wp-block-paragraph">Start with a DEM in a projected coordinate system, clipped a little beyond the catchment you expect — flow needs somewhere to come from, and a basin clipped at its divide will be drawn wrong. Check the elevation range for spikes and voids. Everything that follows assumes water can, in principle, flow from every cell to the edge of the grid; making that true is stage one.</p>



<h2 class="wp-block-heading">Stage 1: Fill the sinks</h2>



<p class="wp-block-paragraph">Real DEMs contain depressions — cells or pits lower than everything around them — from sensor noise, resolution limits and genuine closed basins. Flow routing stops dead in a sink, so the standard first step removes them. SAGA&#8217;s Terrain Analysis – Preprocessing library offers several; the flagship is <strong>Fill Sinks (Wang &amp; Liu)</strong>, which the documentation describes as using the Wang &amp; Liu (2006) algorithm &#8220;to identify and fill surface depressions&#8221;, enhanced so that it not only fills but &#8220;preserves a downward slope along the flow path&#8221; by enforcing a minimum slope gradient between cells. That detail matters: a naively filled flat produces cells with nowhere to flow, while this version guarantees the filled surface still drains. The tool produces the depressionless DEM, a flow-path grid and a watershed-basins grid, and its documentation points very large datasets (it names LiDAR data as the example) to the lighter <strong>Fill Sinks XXL (Wang &amp; Liu)</strong> variant. A <strong>Fill Sinks (Planchon/Darboux, 2001)</strong> implementation sits alongside as an alternative algorithm, and the library&#8217;s Sink Removal and Breach Depressions tools cover cases where cutting through a barrier is more honest than filling it — road embankments and dams being the classic examples.</p>



<p class="wp-block-paragraph"><em>Input:</em> your raw DEM. <em>Output:</em> the filled, hydrologically sound DEM that every later stage should use — never the raw one.</p>



<h2 class="wp-block-heading">Stage 2: Flow accumulation and catchment area</h2>



<p class="wp-block-paragraph">With a draining DEM, compute where the water goes. <strong>Flow Accumulation (Top-Down)</strong> (Terrain Analysis – Hydrology) processes the DEM &#8220;downwards from the highest to the lowest cell&#8221;, in its documentation&#8217;s words, and offers a shelf of routing algorithms: Deterministic 8 (D8, O&#8217;Callaghan &amp; Mark 1984), the Braunschweiger Reliefmodell, Rho 8, Multiple Flow Direction (Freeman 1991; Quinn et al. 1991), Deterministic Infinity (Tarboton 1997), Triangular Multiple Flow Direction (Seibert &amp; McGlynn 2007), and a maximum-downslope-gradient MFD variant (Qin et al. 2011). The choice is a modelling decision: single-direction methods (D8) keep flow in one channel — right for defining stream networks — while multiple-flow-direction methods spread flow across downslope neighbours, which behaves better on hillslopes and is what the wetness indices expect. The library also carries recursive, parallelizable and mass-flux variants of flow accumulation for large grids and special purposes.</p>



<p class="wp-block-paragraph"><em>Input:</em> the filled DEM. <em>Output:</em> flow accumulation / catchment-area grids — how much upslope area drains through each cell. This grid is also the direct input for the <a href="/topographic-wetness-index/">Topographic Wetness Index</a>.</p>



<h2 class="wp-block-heading">Stage 3: Extract the channel network</h2>



<p class="wp-block-paragraph">Accumulation becomes a stream map when you decide how much upslope area makes a channel. <strong>Channel Network</strong> (Terrain Analysis – Channels) &#8220;derives a channel network based on gridded digital elevation data&#8221; and — per its documentation — uses its initiation options to determine the conditions under which channels start; the usual initiation is a threshold on the accumulation grid. Pick the threshold with your landscape in mind: too small and every hillside wrinkle becomes a stream, too large and the headwaters vanish. The same Channels library provides <strong>Strahler Order</strong> for classifying the resulting streams, and <strong>Vertical Distance to Channel Network</strong> and its companions for relating the terrain back to its channels.</p>



<p class="wp-block-paragraph"><em>Input:</em> the filled DEM and the accumulation grid. <em>Output:</em> the channel network as grid and line work.</p>



<h2 class="wp-block-heading">Stage 4: Delineate the basins</h2>



<p class="wp-block-paragraph">The payoff stage divides the terrain into the catchments draining to each channel reach. The Channels library&#8217;s <strong>Watershed Basins</strong> and <strong>Watershed Basins (Extended)</strong> tools do exactly this from the flow-routing results. A convenient one-pass alternative is <strong>Channel Network and Drainage Basins</strong>, a Deterministic-8-based analysis whose documented outputs bundle the whole stage together: flow direction, flow connectivity, Strahler order and drainage-basins grids, plus channel segments, drainage basins and junctions as shapes — with a threshold parameter defined, elegantly, as the Strahler order at which a channel begins. Whichever route you take, the deliverables are a basin grid (every cell labelled with its catchment) and basin polygons you can take into any other GIS.</p>



<p class="wp-block-paragraph"><em>Input:</em> the filled DEM with its flow routing. <em>Output:</em> drainage basins as grid and shapes.</p>



<h2 class="wp-block-heading">Checking the result — and scripting it</h2>



<p class="wp-block-paragraph">Sanity-check before you publish anything: overlay the channels on the DEM and confirm streams sit in valleys, check that basin boundaries follow ridgelines, and compare the delineated area of a basin you know against its mapped area. The two most common failure causes are using the unfilled DEM in a later stage by mistake, and a threshold chosen by habit rather than by landscape. Once the chain works interactively, it scripts beautifully — every tool here is a <a href="/saga-cmd/">saga_cmd</a> call, so a multi-basin study becomes a repeatable file rather than an afternoon of clicking. New to the program itself? Start with our <a href="/how-to-use-saga-gis/">beginner&#8217;s guided tour</a>, then come back and run the chain end to end.</p>

]]></content:encoded>
					
					<wfw:commentRss>https://sagagis.net/watershed-delineation/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Topographic Wetness Index in SAGA GIS: SAGA Wetness Index vs Classic TWI</title>
		<link>https://sagagis.net/topographic-wetness-index/</link>
					<comments>https://sagagis.net/topographic-wetness-index/#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 21 Oct 2026 07:29:45 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://sagagis.net/topographic-wetness-index/</guid>

					<description><![CDATA[Ask a room of terrain analysts which wetness index they use and most will say &#8220;TWI&#8221; — the Topographic Wetness Index. Ask which TWI, and the room goes quiet. SAGA GIS ships not one but three wetness-index tools, in two different libraries, built on three different papers. They answer related but distinct questions, and choosing...]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Ask a room of terrain analysts which wetness index they use and most will say &#8220;TWI&#8221; — the Topographic Wetness Index. Ask which TWI, and the room goes quiet. SAGA GIS ships not one but three wetness-index tools, in two different libraries, built on three different papers. They answer related but distinct questions, and choosing the wrong one quietly changes your results. This page explains what the index means, walks through each verified implementation, and tells you which inputs each one needs.</p>



<h2 class="wp-block-heading">What a wetness index is trying to say</h2>



<p class="wp-block-paragraph">The idea behind every wetness index is simple hydrology. Water arriving on a hillslope flows downhill and accumulates: a cell with a large upslope area draining through it tends to be wetter than a cell on a ridge. Steepness works the other way — the steeper the local slope, the faster water leaves. Combine the two and you get a topographic prediction of soil moisture: high values where large catchment areas meet gentle slopes (valley floors, footslopes, hollows), low values on convex, steep, well-drained ground. The classic formulation, from Beven &amp; Kirkby (1979), is the natural logarithm of the ratio between specific catchment area and the tangent of the slope angle: ln(SCA / tan β). Everything below is a variation on that theme.</p>



<h2 class="wp-block-heading">Option 1: The Topographic Wetness Index tool (the classic)</h2>



<p class="wp-block-paragraph">SAGA&#8217;s tool literally named <strong>Topographic Wetness Index</strong> (Terrain Analysis – Hydrology – Topographic Indices; O. Conrad, 2003) implements the classic formula almost exactly as published. Its documentation states it plainly: given rasters for slope (Beta) and specific catchment area (SCA), it computes TWI = ln(SCA / tan(Beta)), and if you optionally supply a transmissivity grid — how easily the saturated soil profile transmits water — the formula becomes ln(SCA / (T · tan(Beta))). A method choice offers the Standard calculation or a TOPMODEL variant, TOPMODEL being the hydrological model family Beven &amp; Kirkby&#8217;s index grew out of.</p>



<p class="wp-block-paragraph">Note what this means practically: this tool does not take a DEM. It takes the two ingredients — a slope grid and a catchment-area grid — which you prepare first (slope from the morphometry tools, catchment area from a flow-accumulation run, as in our <a href="/watershed-delineation/">watershed delineation walkthrough</a>). The documented command line shows the whole contract:</p>



<pre class="wp-block-code"><code>saga_cmd ta_hydrology 20 -SLOPE=slope.sgrd -AREA=sca.sgrd -TWI=twi.sgrd -METHOD=0</code></pre>



<h2 class="wp-block-heading">Option 2: The SAGA Wetness Index (the house special)</h2>



<p class="wp-block-paragraph">The <strong>SAGA Wetness Index</strong> (same Hydrology – Topographic Indices menu; J. Böhner &amp; O. Conrad, 2001) is SAGA&#8217;s own refinement, and the one most SAGA users actually mean. Its documentation says it is &#8220;similar to the Topographic Wetness Index, but based on a modified catchment area calculation, which does not think of the flow as very thin film.&#8221; The standard index effectively treats upslope water as a thin film whose depth is set by the catchment area; the modified calculation corrects that picture, and — in the documentation&#8217;s words — it &#8220;predicts for cells situated in valley floors with a small vertical distance to a channel a more realistic, higher potential soil moisture compared to the standard TWI calculation.&#8221;</p>



<p class="wp-block-paragraph">Unlike the classic tool, this one takes the <strong>DEM itself</strong> as its input and does the intermediate work for you: its documented outputs include the catchment area, the catchment slope, the modified catchment area, and the index itself. Its options expose the mechanics — a suction parameter (the lower the value, the stronger the suction effect), a choice of area type defaulting to specific catchment area, and a slope type defaulting to catchment slope rather than local slope. If you want one tool, DEM in and wetness out, with the behaviour SAGA&#8217;s soil-mapping literature is built on, this is it.</p>



<h2 class="wp-block-heading">Option 3: WETNESS (the slope-stability one)</h2>



<p class="wp-block-paragraph">The third tool lives in a different neighbourhood — Terrain Analysis – <strong>Slope Stability</strong> — and exists for a different job. <strong>WETNESS</strong> (A. Günther, 2012) calculates a topographic wetness index following Montgomery &amp; Dietrich (1994), built to estimate the saturation of unconsolidated, permeable material lying over relatively impermeable bedrock — the setting of shallow landslides. Its documentation highlights two departures from the TOPMODEL-based TWI: hydraulic conductivity is treated as constant through the soil mantle, and it uses the <em>sine</em> of the slope rather than the tangent, &#8220;which is more correct and significantly matters for steeper slopes.&#8221;</p>



<p class="wp-block-paragraph">Its inputs tell the same story: besides slope (in radians) and catchment area (in m²), it requires groundwater recharge, material hydraulic conductivity and depth to a potential shear plane, given as constants or grids. Its wetness output is a continuous index capped at 1 (overland flow), with an optional classified version — low moisture below 0.1, partially wet up to 1, saturation zone above 1. Reach for this one when the question is slope failure and saturation in the SHALSTAB tradition, not general soil-moisture mapping.</p>



<h2 class="wp-block-heading">Reading the output, whichever you chose</h2>



<p class="wp-block-paragraph">All three produce relative indices, not measurements: a high value says &#8220;topography concentrates water here&#8221;, not &#8220;soil moisture is 38%&#8221;. Compare values within one map, computed one way — never across methods, since the three tools scale differently by design. Valley bottoms, convergent hollows and footslopes should light up; if your ridges do instead, suspect the inputs (an unfilled DEM, a slope grid in radians fed to a tool expecting the value as-is, or a catchment area that is not specific catchment area where the formula expects it). Used with that discipline, a wetness index is one of the highest-value single grids in terrain analysis — a standard covariate for soil mapping, erosion risk and site suitability. If you are new to SAGA, our <a href="/how-to-use-saga-gis/">beginner&#8217;s guided tour</a> shows where these hydrology tools sit in the program, and our <a href="/slope-aspect-curvature/">slope walkthrough</a> covers preparing the slope input properly.</p>

]]></content:encoded>
					
					<wfw:commentRss>https://sagagis.net/topographic-wetness-index/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Use SAGA GIS: A Beginner&#8217;s Guided Tour</title>
		<link>https://sagagis.net/how-to-use-saga-gis/</link>
					<comments>https://sagagis.net/how-to-use-saga-gis/#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 21 Oct 2026 07:29:33 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://sagagis.net/how-to-use-saga-gis/</guid>

					<description><![CDATA[SAGA GIS — the System for Automated Geoscientific Analyses — is a free, open-source GIS built for one job above all others: analysing grids. Where a general-purpose GIS spends its effort on drawing maps and editing vectors, SAGA puts hundreds of specialised geoprocessing tools at the centre, especially for terrain analysis, hydrology and geostatistics. If...]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">SAGA GIS — the System for Automated Geoscientific Analyses — is a free, open-source GIS built for one job above all others: analysing grids. Where a general-purpose GIS spends its effort on drawing maps and editing vectors, SAGA puts hundreds of specialised geoprocessing tools at the centre, especially for terrain analysis, hydrology and geostatistics. If your work involves digital elevation models (DEMs), catchments, slope maps, interpolated climate surfaces or anything else that starts life as a raster, SAGA was designed for you. This guided tour takes you from a fresh installation to your first finished analysis.</p>



<h2 class="wp-block-heading">Who SAGA GIS is for</h2>



<p class="wp-block-paragraph">SAGA&#8217;s home ground is research and professional geoprocessing. Its official tool documentation for version 9.12 counts, among others, 32 tools in Terrain Analysis – Hydrology, 30 in Terrain Analysis – Morphometry, 45 in Grid Tools, and dedicated libraries for kriging and regression in the Spatial &amp; Geostatistics family. Students use it for coursework and theses because it is free under the GPL and runs the same algorithms cited in the literature. Consultants and agencies use it because those algorithms are strong: the SAGA Wetness Index and its flow-accumulation routines are reference implementations other software is measured against. And because every tool can also be run from the command line or from Python and R, SAGA fits scripted, reproducible workflows just as well as point-and-click analysis.</p>



<p class="wp-block-paragraph">It is not a cartography suite and it is not a database. Think of SAGA as the analytical engine in your GIS toolbox — the place data goes to be computed on. If you have not installed it yet, start with our <a href="/download/">download page</a> and the version guidance in <a href="/latest-version/">which SAGA version is current</a>; this tour assumes a working installation.</p>



<h2 class="wp-block-heading">The interface at a glance</h2>



<p class="wp-block-paragraph">SAGA&#8217;s main window is organised around three working areas. On one side sits a manager panel with a tree structure. One branch of the tree lists the tools, grouped by library — Terrain Analysis, Grid Tools, Imagery, Spatial &amp; Geostatistics and so on. Another branch lists the data you have loaded: grids, shapes, tables and point clouds, each shown with the coordinate system and extent it carries. The large central area is the map view, where loaded data and tool results are displayed and where you inspect values cell by cell. A properties area shows the settings of whatever you have selected — a dataset&#8217;s display options, or a tool&#8217;s parameters when you open it.</p>



<p class="wp-block-paragraph">The working rhythm follows from that layout. You load data into the tree, find a tool in the library tree, open it, and its dialog asks you for input data (picked from what is already loaded, or from a file) and for the outputs it should create. You run it, and the results appear in the data tree and, if you ask, in a new map. Nearly everything else in this tour — and in SAGA generally — is a variation on that rhythm.</p>



<h2 class="wp-block-heading">Step 1: Load a DEM</h2>



<p class="wp-block-paragraph">Most SAGA analyses start with a grid, and the classic first grid is a DEM. Use the file-open route in the manager (or drag the file onto the window) and choose your elevation grid. SAGA&#8217;s native grid format is a set of three companion files — a small header with the <code>.sgrd</code> extension, the binary data in a <code>.sdat</code> file, and metadata in a <code>.mgrd</code> file — so if your DEM is already in SAGA format, open the <code>.sgrd</code> file. If your elevation data arrives as a GeoTIFF or another common raster, SAGA can import it through its GDAL-based import; once loaded, the grid appears in the data tree and you can double-click it to see it in the map view. Our guide to <a href="/sgrd-sdat-files/">SGRD and SDAT files</a> explains the format triplet in detail, including which of the three files other software needs.</p>



<p class="wp-block-paragraph">Two checks are worth doing before you compute anything. First, confirm the grid&#8217;s coordinate system is a projected one with meaningful units — slope and flow tools interpret cell size in the grid&#8217;s units, and a DEM stored in degrees will produce nonsense gradients. Second, note the cell size and extent shown in the properties: a 30 m DEM and a 1 m LiDAR DEM behave very differently in the same tool.</p>



<h2 class="wp-block-heading">Step 2: Run your first tool — slope</h2>



<p class="wp-block-paragraph">In the tool tree, open the Terrain Analysis – Morphometry library and start the <strong>Slope, Aspect, Curvature</strong> tool. This is the workhorse morphometry tool, documented as tool 0 of the <code>ta_morphometry</code> library. In its dialog, set your DEM as the elevation input and choose where the slope and aspect outputs should go; leave the method at its default, which is the Zevenbergen &amp; Thorne (1987) method, and set the slope unit to degrees if that is how you like to read terrain. Run the tool.</p>



<p class="wp-block-paragraph">Within moments you have two new grids in the data tree: slope, and aspect (the compass direction each cell faces, measured from north and increasing clockwise). Add the slope grid to a map alongside the DEM and you are looking at your first real SAGA result — steep ground lights up, plains go flat, and the terrain&#8217;s structure becomes obvious. Our dedicated walkthrough, <a href="/slope-aspect-curvature/">Slope, Aspect &amp; Curvature in SAGA GIS</a>, covers every output this tool can produce, including the curvature grids, and shows the same analysis as a command-line call.</p>



<h2 class="wp-block-heading">Step 3: Read and question the result</h2>



<p class="wp-block-paragraph">A grid in the map view is not the end of an analysis; it is the point where questions start. Click around the slope map: do the flat valley floors read near zero, and the hillsides at plausible angles? Check the grid&#8217;s value range in its properties — if your steepest &#8220;slope&#8221; reads in the thousands, the elevation units or the coordinate system are wrong, not the terrain. SAGA rewards this habit of verification, because its tools are literal: they compute exactly what the inputs say, including the inputs&#8217; mistakes — a DEM with unfilled sinks, for example, will break flow routing no matter which hydrology tool you choose. (Filling those sinks is a standard preprocessing step; our <a href="/watershed-delineation/">watershed delineation walkthrough</a> shows where it fits.)</p>



<h2 class="wp-block-heading">Step 4: Save your project</h2>



<p class="wp-block-paragraph">When the session is worth keeping, save it as a project. SAGA projects use the <code>.sprj</code> extension and record the data loaded, the maps you built and their display settings, so reopening the project restores your workspace rather than just a pile of files. Save the project next to its data and keep the three companion files of each native grid together — a project that points at a moved or separated <code>.sdat</code> file cannot load its grids.</p>



<h2 class="wp-block-heading">Where to go next</h2>



<p class="wp-block-paragraph">From this base camp, the productive directions are the ones SAGA is famous for. Follow water downhill with the <a href="/topographic-wetness-index/">Topographic Wetness Index</a> and a full <a href="/watershed-delineation/">watershed delineation</a>; interpolate point measurements properly with <a href="/kriging-in-saga-gis/">kriging</a>. When clicking becomes repetitive, graduate to automation: <a href="/saga-cmd/">saga_cmd</a> runs every tool from the command line, <a href="/pysaga/">PySAGA</a> drives SAGA from Python, and <a href="/rsaga/">RSAGA</a> does the same from R. If you prefer to keep your mapping in QGIS, our hub on <a href="/saga-gis-in-qgis/">SAGA GIS in QGIS</a> explains how the two programs work together in 2026. And if a download, a platform question or a version question brought you here, the <a href="/download/">download page</a>, the platform guides for <a href="/download-for-windows/">Windows</a>, <a href="/saga-gis-for-mac/">Mac</a> and <a href="/saga-gis-for-linux/">Linux</a>, and the <a href="/version-history/">version history</a> have you covered.</p>



<p class="wp-block-paragraph">One last habit worth forming on day one: when a tool&#8217;s dialog puzzles you, read its official documentation page. Every SAGA tool has one, and it states the method, the references and the exact parameters — the same text the command-line interface prints. Analysts who cite the tool documentation in their methods sections sleep better, and so will you.</p>

]]></content:encoded>
					
					<wfw:commentRss>https://sagagis.net/how-to-use-saga-gis/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PySAGA: Automate SAGA GIS from Python</title>
		<link>https://sagagis.net/pysaga/</link>
					<comments>https://sagagis.net/pysaga/#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 21 Oct 2026 07:24:17 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://sagagis.net/pysaga/</guid>

					<description><![CDATA[If your GIS work already lives in Python — in scripts, notebooks and data pipelines — PySAGA is the SAGA interface built for you. PySAGA is SAGA GIS&#8217;s official Python interface: it exposes the SAGA API to Python, so the same tool libraries you would click through in the SAGA GUI, or call through saga_cmd,...]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">If your GIS work already lives in Python — in scripts, notebooks and data pipelines — PySAGA is the SAGA interface built for you. PySAGA is SAGA GIS&#8217;s <strong>official Python interface</strong>: it exposes the SAGA API to Python, so the same tool libraries you would click through in the SAGA GUI, or call through <a href="/saga-cmd/">saga_cmd</a>, become part of a Python workflow. This guide covers what PySAGA is, where it comes from, the one import pattern the documentation establishes, and the recent releases that made it considerably more interesting.</p>



<h2 class="wp-block-heading">PySAGA ships with SAGA — there is nothing separate to install</h2>



<p class="wp-block-paragraph">The first thing to understand is distribution. Since <strong>SAGA 9.1.0</strong>, the Windows download — both the installer and the portable ZIP — includes the full Python interface, and PySAGA is also available with SAGA on other platforms. It is part of the SAGA release you get from the <a href="/download/">download page</a>, not a third-party wrapper and not a separate product. (Community packages with similar names exist; the official interface is the one bundled with SAGA itself.) If you keep SAGA current — <a href="/latest-version/">9.14.0</a> at the time of writing — your PySAGA is current too, which removes the version-matching problem that complicates some other SAGA integrations.</p>



<h2 class="wp-block-heading">The documented starting point</h2>



<p class="wp-block-paragraph">PySAGA scripts begin by importing the SAGA API module:</p>



<pre class="wp-block-code"><code>from PySAGA import saga_api</code></pre>



<p class="wp-block-paragraph">That single import is the documented entry point. Through <code>saga_api</code>, a script works with the same objects the SAGA application itself uses: it can load and create grids and other datasets, inspect and manipulate them through the API, and run tools from SAGA&#8217;s tool libraries with parameters set in code, saving results in SAGA&#8217;s native formats for the next step of the pipeline. The practical shape of a PySAGA workflow is therefore familiar to anyone who has scripted geoprocessing elsewhere: load data, apply a documented tool with explicit parameters, pass the output into the next operation, and write the final results to disk — all inside one rerunnable Python file instead of a morning of mouse clicks.</p>



<p class="wp-block-paragraph">One discipline is worth adopting from the start: SAGA&#8217;s API documentation ships with each release (the API documentation package is part of the official download set), and it — not blog posts, including this one — is the authority for exact class and method names for your version. APIs evolve between releases, and code copied from an article written against an older SAGA may use calls that have since moved. Treat tutorials as maps and the shipped API documentation as the territory.</p>



<h2 class="wp-block-heading">What recent releases added</h2>



<ul class="wp-block-list">
<li><strong>SAGA 9.10.0</strong> added a <strong>typing stub</strong> for PySAGA. In plain terms, your editor or IDE can now offer meaningful autocomplete and type checking while you write PySAGA code — a small addition that makes a large difference to how pleasant the API is to explore.</li>
<li><strong>SAGA 9.14.0</strong> moved the SAGA GUI&#8217;s <strong>map rendering into the API</strong>, making it usable from PySAGA. Scripts can now produce rendered maps, not just data — the difference between a pipeline that ends with a file and one that ends with a figure.</li>
<li><strong>SAGA 9.14.0</strong> also ships an <strong>updated Jupyter Notebook example</strong> demonstrating PySAGA in action. If you learn best by running and modifying a working example, that notebook is the intended front door, and it has the advantage of being tested against the exact release it ships with.</li>
</ul>



<h2 class="wp-block-heading">PySAGA, saga_cmd, or the QGIS provider?</h2>



<p class="wp-block-paragraph">All three drive the same SAGA tools; they differ in where your workflow lives. <strong>saga_cmd</strong> is the leanest automation route — one tool per command, ideal for shell scripts and batch loops over many files, as our <a href="/saga-cmd/">saga_cmd guide</a> shows. <strong>PySAGA</strong> earns its place when the work between SAGA calls is Python: preparing data with your usual Python stack, looping with real control flow, keeping intermediate results in the session, and finishing in a Jupyter notebook that documents itself. The <strong>QGIS NextGen provider</strong>, covered in our <a href="/saga-gis-in-qgis/">hub guide</a>, is the interactive option — best when you are exploring data visually and have not yet settled what to run. A common pattern is to prototype in QGIS or the SAGA GUI, then rebuild the settled workflow in PySAGA so it can be rerun, reviewed and shared. R users have their own equivalent route through <a href="/rsaga/">RSAGA and Rsagacmd</a>.</p>



<h2 class="wp-block-heading">If the import fails</h2>



<p class="wp-block-paragraph">The most common beginner stumbling block is not the API itself but the Python environment: the script or notebook you run must be using a Python setup that can see the PySAGA package inside your SAGA installation. If the import at the top of this guide fails, the productive first question is &#8220;which Python is running this code, and can it see my SAGA folder?&#8221; — not &#8220;what is wrong with the API?&#8221;. Confirm that SAGA itself opens normally, confirm which SAGA version you have (the answer should match <a href="/latest-version/">the latest version page</a> if you installed recently), and only then work through the environment side. This ordering matters because every PySAGA release is tested as part of the SAGA release it ships with; a matched SAGA-plus-PySAGA pair removes an entire class of problems before you write a line of your own code.</p>



<h2 class="wp-block-heading">A realistic first project</h2>



<p class="wp-block-paragraph">Start from the shipped Jupyter example rather than a blank file: run it against a small DEM you know well, then change one thing — a different input grid, a different tool from the morphometry library, an extra output. Within an hour you will understand the object flow better than any reference reading gives you, and you will have a notebook you can grow into a real pipeline. Keep the test data small, keep SAGA itself updated via the <a href="/version-history/">version history</a> page, and consult the bundled API documentation whenever a call does not behave as expected — between the typing stub&#8217;s autocomplete and the official example, most beginner questions answer themselves.</p>



<p class="wp-block-paragraph">PySAGA&#8217;s story is one of an interface growing up: bundled since 9.1, friendlier since the 9.10 typing stub, and newly able to render maps since 9.14. For Python-centred GIS work it is now the most natural way to put SAGA&#8217;s extensive tool libraries to work.</p>

]]></content:encoded>
					
					<wfw:commentRss>https://sagagis.net/pysaga/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>saga_cmd: Run SAGA GIS Tools from the Command Line</title>
		<link>https://sagagis.net/saga-cmd/</link>
					<comments>https://sagagis.net/saga-cmd/#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 21 Oct 2026 07:24:05 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://sagagis.net/saga-cmd/</guid>

					<description><![CDATA[Every tool in SAGA GIS — all of its terrain, hydrology, grid and geostatistics libraries — can be run without opening the SAGA graphical interface at all. The vehicle is saga_cmd, SAGA&#8217;s official command-line interface, which ships with every SAGA installation. If you need to process a folder of DEMs overnight, reproduce an analysis exactly,...]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Every tool in SAGA GIS — all of its terrain, hydrology, grid and geostatistics libraries — can be run without opening the SAGA graphical interface at all. The vehicle is <strong>saga_cmd</strong>, SAGA&#8217;s official command-line interface, which ships with every SAGA installation. If you need to process a folder of DEMs overnight, reproduce an analysis exactly, or let another program drive SAGA, saga_cmd is the layer you will use. This guide explains the command pattern, shows you how to read any tool&#8217;s parameters, and walks through one complete example taken from SAGA&#8217;s official tool documentation.</p>



<h2 class="wp-block-heading">What saga_cmd is, and where it lives</h2>



<p class="wp-block-paragraph">saga_cmd is not a separate download. On Windows it sits in the SAGA installation folder alongside the graphical program — in the folder created by the installer, or in the folder you unzipped the portable package into (see <a href="/download-for-windows/">SAGA for Windows</a>). On macOS it is part of the official Mac package covered in our <a href="/saga-gis-for-mac/">Mac guide</a>, and Linux packages place it on the system in the usual way for command-line tools (see <a href="/saga-gis-for-linux/">SAGA for Linux</a>). If SAGA runs on your machine, saga_cmd is already there; open a terminal in — or pointing at — that installation and you are ready.</p>



<p class="wp-block-paragraph">The interface matters beyond interactive scripting. Other software drives SAGA through this same command-line layer: the R package RSAGA, for example, works by running SAGA&#8217;s command-line version, and the automation options compared in our <a href="/saga-gis-in-qgis/">SAGA in QGIS hub</a> all ultimately rest on the tools saga_cmd exposes. Learning the pattern once pays off in every direction.</p>



<h2 class="wp-block-heading">The command pattern</h2>



<p class="wp-block-paragraph">Every saga_cmd call has the same shape:</p>



<pre class="wp-block-code"><code>saga_cmd &lt;library&gt; &lt;tool number&gt; -PARAMETER=value -PARAMETER=value ...</code></pre>



<p class="wp-block-paragraph">You name the tool library (for example <code>ta_morphometry</code> for terrain morphometry), then the tool&#8217;s number within that library, then its parameters as <code>-NAME=value</code> pairs. Input files, output files and options are all parameters; there is no separate syntax for them. Run saga_cmd with a library and tool number and no parameters, and it answers with that tool&#8217;s full usage text — every parameter, its type, its choices and its defaults. That usage text is exactly what SAGA&#8217;s official tool documentation reproduces for each tool, so the documentation and the program in front of you can never disagree for long: when in doubt, ask the tool.</p>



<h2 class="wp-block-heading">A complete, documented example: slope, aspect, curvature</h2>



<p class="wp-block-paragraph">The example below is the <strong>Slope, Aspect, Curvature</strong> tool from the terrain morphometry library, as documented in the official SAGA 9.12.0 tool documentation (<a href="https://saga-gis.sourceforge.io/saga_tool_doc/9.12.0/ta_morphometry_0.html" target="_blank" rel="noopener">ta_morphometry tool 0</a>). It computes slope, aspect and — depending on the method — curvature grids from an elevation grid:</p>



<pre class="wp-block-code"><code>saga_cmd ta_morphometry 0 -ELEVATION=dem.sgrd -SLOPE=slope.sgrd -ASPECT=aspect.sgrd -METHOD=6 -UNIT_SLOPE=1 -UNIT_ASPECT=1</code></pre>



<p class="wp-block-paragraph">What each parameter means, following the documentation:</p>



<ul class="wp-block-list">
<li><code>-ELEVATION</code> — the input grid: your DEM, in SAGA&#8217;s native grid format.</li>
<li><code>-SLOPE</code> — the output grid for slope. This is the one output the tool always produces.</li>
<li><code>-ASPECT</code> — an optional output grid for aspect. The documentation notes that aspect angles start at 0 for the north direction and increase clockwise. Leave the parameter out and no aspect grid is written.</li>
<li><code>-METHOD</code> — the algorithm used. The documentation lists nine choices, numbered 0 to 8, from maximum slope (Travis et al. 1975) through least-squares fitted plane (Horn 1981) to the 10-parameter third-order polynomials of Haralick and Florinsky. The default, <strong>6</strong>, is the 9-parameter second-order polynomial of Zevenbergen &amp; Thorne (1987) — a sound default for general terrain work.</li>
<li><code>-UNIT_SLOPE</code> — the slope unit: 0 = radians (the default), 1 = degree, 2 = percent rise. Most GIS users want degrees, which is why the example sets 1.</li>
<li><code>-UNIT_ASPECT</code> — the aspect unit: 0 = radians (default) or 1 = degree.</li>
</ul>



<p class="wp-block-paragraph">The same tool can also produce a family of optional curvature outputs — general, profile, plan, tangential, longitudinal and cross-sectional curvature, among others — each under its own parameter (<code>-C_GENE</code>, <code>-C_PROF</code>, <code>-C_PLAN</code>, <code>-C_TANG</code>, <code>-C_LONG</code>, <code>-C_CROS</code>). You request only the ones you need; unrequested outputs are simply not written. That pattern — one required input, named outputs, optional extras, and a method choice with a documented default — repeats across SAGA&#8217;s tool libraries, so once you can read one tool&#8217;s documentation page, you can drive any of them.</p>



<h2 class="wp-block-heading">About the files: .sgrd and .sdat</h2>



<p class="wp-block-paragraph">saga_cmd reads and writes SAGA&#8217;s native formats by default. A SAGA grid is a pair of files: the <strong>.sgrd</strong> header you name on the command line, and a <strong>.sdat</strong> data file written next to it. Other software, including GDAL-based tools, reads the .sdat half. Remembering which half is which saves real confusion when scripts hand files to other programs — the same point that trips up QGIS users in our <a href="/saga-nextgen-not-working/">NextGen troubleshooting guide</a>.</p>



<h2 class="wp-block-heading">Batch processing: the reason the command line exists</h2>



<p class="wp-block-paragraph">The payoff for learning the pattern is repetition. A slope calculation you have run once can be applied to every DEM in a folder with a short shell loop that changes only the input and output names:</p>



<pre class="wp-block-code"><code>for f in dems/*.sgrd; do
  saga_cmd ta_morphometry 0 -ELEVATION="$f" -SLOPE="out/$(basename "$f" .sgrd)_slope.sgrd" -UNIT_SLOPE=1
done</code></pre>



<p class="wp-block-paragraph">Every file gets identical settings, the run can be logged, and the whole job can be repeated next month on new data by re-running the script. That reproducibility is why scripted routes — saga_cmd directly, or <a href="/pysaga/">PySAGA</a> from Python — are the standard approach for production terrain pipelines, while the SAGA GUI and the <a href="/install-saga-nextgen-provider/">QGIS NextGen provider</a> serve interactive exploration. Choose per task, not per loyalty: explore in the GUI, note the tool and parameters, then automate the repetition here.</p>



<h2 class="wp-block-heading">Getting started</h2>



<p class="wp-block-paragraph">You need nothing beyond a working SAGA installation from the <a href="/download/">download page</a>. Open a terminal, run saga_cmd with no arguments to see the libraries your version offers, pick a tool, and ask it for its parameters. If saga_cmd answers, you also hold a diagnostic trump card: a SAGA that works from the command line but not through QGIS has a configuration problem, not an installation problem — the distinction at the heart of our <a href="/saga-nextgen-not-working/">troubleshooting guide</a>.</p>

]]></content:encoded>
					
					<wfw:commentRss>https://sagagis.net/saga-cmd/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install the SAGA NextGen Provider in QGIS (Step by Step)</title>
		<link>https://sagagis.net/install-saga-nextgen-provider/</link>
					<comments>https://sagagis.net/install-saga-nextgen-provider/#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Wed, 21 Oct 2026 07:23:43 +0000</pubDate>
				<category><![CDATA[Tutorials]]></category>
		<guid isPermaLink="false">https://sagagis.net/install-saga-nextgen-provider/</guid>

					<description><![CDATA[The SAGA tools no longer ship inside QGIS — since QGIS 3.30 they reach the Processing Toolbox through the Processing Saga NextGen Provider plugin, which connects QGIS to a SAGA GIS installation on your machine. This guide walks through the whole setup: installing SAGA first, adding the plugin, telling it where SAGA lives, and running...]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">The SAGA tools no longer ship inside QGIS — since QGIS 3.30 they reach the Processing Toolbox through the <strong>Processing Saga NextGen Provider</strong> plugin, which connects QGIS to a SAGA GIS installation on your machine. This guide walks through the whole setup: installing SAGA first, adding the plugin, telling it where SAGA lives, and running a first test tool. If you want the background on why the old built-in provider disappeared and what happened to the plugin in 2026, read <a href="/saga-gis-in-qgis/">SAGA GIS in QGIS: how it works in 2026</a> first.</p>



<h2 class="wp-block-heading">Before you start</h2>



<ul class="wp-block-list">
<li><strong>QGIS</strong> installed and opening normally. The NextGen provider is the route for all current QGIS versions; there is no built-in SAGA provider to enable in QGIS 3.30 or later.</li>
<li><strong>A standalone SAGA GIS installation</strong> (next step). The plugin does not contain SAGA — it drives an external copy.</li>
<li><strong>A current SAGA version.</strong> Compatibility fixes for the NextGen plugin landed in SAGA 9.12.4, and SAGA 9.13.0 added a SAGA-side continuation of the plugin. Use the <a href="/latest-version/">latest version</a> (currently 9.14.0) rather than an old release you happen to have lying around.</li>
</ul>



<h2 class="wp-block-heading">Step 1: Install SAGA GIS on its own</h2>



<p class="wp-block-paragraph">Do this before touching QGIS. Download SAGA from the <a href="/download/">download page</a> and install it for your platform — <a href="/download-for-windows/">Windows</a>, <a href="/saga-gis-for-mac/">macOS</a> or <a href="/saga-gis-for-linux/">Linux</a>. On Windows, both the installer and the portable ZIP work; if you choose the portable package, note the folder you unzip it to, because you will need that exact path in step 3. Open SAGA once and confirm it starts. A SAGA that does not run standalone will not run through QGIS either, and it is far easier to diagnose on its own.</p>



<h2 class="wp-block-heading">Step 2: Install the NextGen provider plugin</h2>



<p class="wp-block-paragraph">In QGIS, open the <strong>Plugins</strong> menu and choose <strong>Manage and Install Plugins</strong>. Search the plugin repository for the <strong>Processing Saga NextGen Provider</strong> and install it. The plugin registers SAGA as a provider within QGIS Processing — the same framework that hosts QGIS&#8217;s own algorithms — which is why the SAGA tools will appear in the Processing Toolbox rather than in a separate window.</p>



<p class="wp-block-paragraph">One honest caveat: during May and June 2026 the plugin was reported broken and unavailable, and the repair effort involved both the plugin and SAGA itself. If you are reading an older forum thread or tutorial describing a SAGA connection that &#8220;just stopped working&#8221;, that is the episode it refers to. The combination this guide describes — current QGIS, the current plugin, and SAGA 9.12.4 or newer — is the post-fix arrangement.</p>



<h2 class="wp-block-heading">Step 3: Tell the provider where SAGA lives</h2>



<p class="wp-block-paragraph">The provider needs the path of your SAGA installation folder. Open QGIS&#8217;s <strong>Settings</strong> (Options) dialog, go to the <strong>Processing</strong> section, and expand the <strong>Providers</strong> list. Under the SAGA provider you will find a setting for the <strong>SAGA folder</strong> location. Browse to the folder that contains your SAGA installation — the folder holding the SAGA executables from step 1, not a data folder and not a project folder. Accept the settings.</p>



<p class="wp-block-paragraph">This path is the single most common point of failure in the whole setup. Installer versions put SAGA in a standard programs location; portable versions put it wherever you unzipped them; a folder left over from an older SAGA install will point the provider at the wrong release. If the tools do not appear in the next step, come back here and check the path character by character before changing anything else. Our <a href="/saga-nextgen-not-working/">troubleshooting guide</a> explains how to confirm whether the folder is the problem.</p>



<h2 class="wp-block-heading">Step 4: Confirm the SAGA tools appear</h2>



<p class="wp-block-paragraph">Open the <strong>Processing Toolbox</strong>. You should now see a SAGA section with toolboxes grouped by SAGA&#8217;s tool libraries — terrain analysis, grid tools, geostatistics and the rest of SAGA&#8217;s library structure. If the SAGA section is there, the connection works. If it is missing entirely, work through steps 2 and 3 again: plugin installed and enabled, folder path correct. If the section appears but tools fail when run, that is a different class of problem, covered in the <a href="/saga-nextgen-not-working/">fixes guide</a>.</p>



<h2 class="wp-block-heading">Step 5: Run a first test on something small</h2>



<p class="wp-block-paragraph">Do not make your first test a full research workflow. Load a small DEM — a clipped extract of your study area is ideal — and run one simple, fast SAGA terrain tool on it, such as a slope calculation. Let the output go to a temporary layer and confirm a result appears on the map. A tiny test isolates setup problems from data problems: if a slope grid appears over a small DEM, your plugin, path and SAGA installation are all healthy, and any later failure will be about the specific tool or dataset. Note that SAGA works in its native grid format, so outputs carry the <strong>.sdat</strong> extension; inside QGIS they behave as ordinary layers. The <a href="/saga-gis-in-qgis/">hub guide</a> explains the .sgrd/.sdat file pair if you meet these files outside QGIS.</p>



<h2 class="wp-block-heading">Notes by operating system</h2>



<ul class="wp-block-list">
<li><strong>Windows:</strong> the installer and the portable ZIP both work with the provider. The portable package has one advantage for diagnosis — you know exactly which folder it lives in, because you chose it.</li>
<li><strong>macOS:</strong> use SAGA&#8217;s official Mac package; our <a href="/saga-gis-for-mac/">SAGA GIS for Mac guide</a> covers what the official package is and is not.</li>
<li><strong>Linux:</strong> distribution packages and the COPR/AUR routes are covered in the <a href="/saga-gis-for-linux/">SAGA GIS for Linux guide</a>. What matters for QGIS is simply that the provider&#8217;s folder setting points at the installation those packages created.</li>
<li><strong>OSGeo4W / standalone QGIS installers:</strong> these have historically bundled SAGA alongside QGIS, but bundling is installer-dependent and not a guarantee. Even where a bundled copy exists, an explicit standalone SAGA plus a folder path you chose yourself is the arrangement that stays predictable across updates.</li>
</ul>



<h2 class="wp-block-heading">Keeping the setup healthy</h2>



<p class="wp-block-paragraph">Treat QGIS, the plugin and SAGA as three parts of one system and update them together. In particular, do not let SAGA drift years behind: the 2026 repair history shows that when this connection breaks, the fix tends to arrive in SAGA releases such as 9.12.4 and 9.13.0 as much as in the plugin. Checking <a href="/version-history/">what changed between SAGA versions</a> before a big project is a two-minute habit that prevents most surprises. And if you outgrow the GUI route — batch-processing many DEMs, for instance — the same SAGA installation can be driven directly through <a href="/saga-cmd/">saga_cmd</a> or <a href="/pysaga/">PySAGA</a> without changing anything you set up here.</p>

]]></content:encoded>
					
					<wfw:commentRss>https://sagagis.net/install-saga-nextgen-provider/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
