Open-source software for landscape ecology
See a landscape change, cell by cell, and know why.
Terraflux is a free desktop application and command line for habitat patterns, connectivity, spatial prioritization, species distributions and land change simulation. You build an analysis by connecting nodes, and it gives the same numbers as the tools you would cite.
For Windows, macOS and Linux. GDAL included, nothing else to install. Free under the GPL.
The same numbers as the tools you cite
Terraflux re-implements established methods from their publications and source code, and its test suite checks each one against the reference implementation, most of them to the last bit. A reviewer who knows FRAGSTATS or Zonation will find the same results.
An analysis is a graph you can read
Each step is a node: read a map, reclassify it, run MSPA, plot the result. You connect an output to an input, and Terraflux checks that the two fit. Change a setting and only what depends on it runs again, so the map updates while you think.
- Every node carries a note saying why it is there, so a model explains itself to a colleague.
- The graph is a small text file: keep it under version control and publish it with your paper.
- The same file runs in the application, from the command line, on a cluster and from Python.

Ask for the analysis, watch it being built
Connect an AI assistant to Terraflux and describe what you want in plain words. The assistant adds the nodes, connects and sets them, checks the model and runs it, and the graph grows on your canvas as it works. Undo any step with ctrl+Z, or change it by hand.
- Every edit passes the same checks as yours: a connection that does not fit is refused, with the reason.
- Terraflux runs on your computer. The assistant receives the model and the summaries it asks for, not your maps.
- The result is an ordinary model file that runs again without the assistant.
Read landcover.tif, where class 3 is forest, run MSPA with an edge width of 2
and open it in Terraflux.
new_modelfragmentation.tomladd_noderead · raster.readadd_nodeforest · raster.reclassifyadd_nodemspa · landscape.mspacheck_modelThe model can run.open_in_appthe canvas follows every edit
Claude DesktopClaude CodeGemini CLICodexany MCP client
From a first map to a full study
436 operators in eighteen fields, each with tutorials that start from the idea behind the method and the papers that introduced it, and end with the graph that runs it.
From a laptop to a cluster, without rewriting anything
Run fifty replicates on the cores of your laptop, lend the lab's computers to a calibration with a pairing code, or send five hundred scenarios to your university's Slurm cluster. The model stays the same file. Maps larger than memory run in tiles, with the same result whatever the number of machines.
Read the guide to parallel and distributed computing- Your computerMost cores, a quarter left free
terraflux submit model.toml --replicates 50 - The lab's computersFound on the network, joined by a code
terraflux worker --code K7QM-2XPA-9DTE - A cluster or the cloudSlurm or SSH, saved once
terraflux submit model.toml --replicates 500 --on hpc
Get Terraflux
The installers bring GDAL and every library Terraflux needs.
Linux
x86-64, glibc 2.39 or newer (Ubuntu 24.04+, Debian 13+, Fedora 40+, Arch)
Debian / Ubuntu (.deb) Other formatsOpen science, open source
Terraflux is free software under the GPL. Its methods are documented with the papers they come from, its results are tested against the reference implementations, and every model is a text file that can be published beside the paper that used it.
How to cite Terraflux@software{terraflux,
author = {Lacerda, Eduardo},
title = {Terraflux: landscape ecology and land change
modelling from a laptop to a cluster},
version = {1.41.0},
year = {2026},
url = {https://github.com/sacridini/terraflux},
license = {GPL-3.0-or-later}
}