TerraME: Simulation and Modelling of Terrestrial Systems

NEWS: TerraME 1.2 has been released!

TerraME overview: Modeling Nature-Society Interactions

TerraME is a programming environment for spatial dynamical modelling. It supports cellular automata, agent-based models, and network models running in 2D cell spaces. TerraME provides an interface to TerraLib geographical database, allowing models direct access to geospatial data. Its modelling language has in-built functions that makes it easier to develop multi-scale and multi-paradigm models for environmental applications.

Two important innovations in TerraME are its use of anisotropic spaces and of hybrid automata models. Anisotropic spaces arise when modeling natural and human-related phenomena. For example, land settlers in a new area do not occupy all places at the same time. They follow roads and rivers, leading to an anisotropic pattern. Anisotropic spaces are implemented in TerraME using Generalized Proximity Matrices (GPM). The GPM is an extension of the usual definition of the spatial relations and include a combination of neighborhood measures in the absolute space and in the relative space.

A hybrid automaton is an abstract model for a system whose behavior has discrete and continuous parts. It extends the idea of finite automata to allow continuous change to take place between transitions. Adopting hybrid automata in spatial dynamical models allows complex models which include critical transitions.

A vision of research motivations and directions of Environmental Modelling in INPE is available in this presentation. An early presentation of our vision is How can GIScience contribute to Land Change Modelling?, the keynote speech at GIScience 2006. The rationale for the TerraME software is presented in the lecture Modelling human-environment interactions, presented in the Vespucci Summer School 2010.


The latest version of TerraME is 1.2. It works under Windows (XP, Vista, and Windows 7), Mac and Linux.

New Features

  • Multiple Neighborhood visualization support for Map Observers
  • Multiple attribute visualization support for Graph Observers
  • New Observer types for TerraME entities
  • TerraLib database legend retrieval
  • MacOS support

Development kits

You can build models in TerraME using any text file editor. Below there is a list of editors we recommend due to their programming facilities.


TerraView is a GIS application based on TerraLib, a library to handle vector and raster data in several geographical DBMS. TerraME currently works with TerraView 4.2.0. Some useful plugins to work with dynamic models that come within TerraView are:

  • Fill Cell Plugin: Feeds cellular spaces with attributes based on any geometry, through a large set of operations.
  • Copytheme2layer: A simple and useful plugin to interchange cellular spaces from different databases.


The DataBase Management Systems (DBMS) currently supported by TerraME are:

  • Microsoft Access: Recommended for small projects. It usually comes installed on Windows.
  • MySQL: Recommended for large projects.

Statistical analysis

aRT (R-TerraLib API) is an R package that provides the integration between the statistical software R and the GIS library TerraLib. The aim is to have a package for accessing geospatial data to be analysed in R.


  • LuccME, an extension for top-down land change modeling.




  • Examples can be found here.


  • We use TerraME on our courses on Enviromental Modelling. We give regular graduate courses in the research programs in Earth System Science at INPE and Computer Science at UFOP.

Papers and reports


  • The C++ source code documentation is available here.
  • List of known bugs.


The chief developer of TerraME is Prof. Tiago Garcia de Senna Carneiro, from the Federal University of Ouro Preto (UFOP). INPE's development group includes Dr. Pedro Andrade, and MsC student Raian Vargas Maretto. INPE's researchers involved in developing models using TerraME include Dr. Gilberto Camara, Dr. Antonio Miguel Monteiro, Dr. Ana Paula Aguiar, Dr. Giovana Mira de Espindola, and PhD candidates Sergio Costa and Rodolfo Maduro Almeida. The TerraME kernel development team includes some research assistants from UFOP - Msc. Rodrigo Reis Pereira and Msc. Tiago Franca de Melo Lima, and also includes some undergraduate and master students from UFOP Computer Science Department: Antônio José da Cunha Rodrigues, Saulo Henrique Cabral Silva, Henrique Cota Camello, Washington Sena de França , Rafael Lage Moreira Barbosa , and Breno de Almeida Pereira. TerraME model calibration tools are being developed in association with researches and master students from the Eletrical Engineering Department from Federal University of Minas Gerais: Dr. Frederico Gadelha Guimarãesand Rodolfo Ayala Lopes Costa.

Supporting Software

The TerraME modelling language is an extension of the Lua programming language and interfaces to http://www.terralib.org GIS library for archival and retrieval of geospatial data. Many thanks to the Lua and TerraLib teams for providing such good environments to build upon!



TerraME has been developed as a joint effort among TerraLab (Laboratory for Modelling and Simulation of Earth Systems), at Federal University of Ouro Preto, with Earth System Science Center (CCST) and Image Processing Division (DPI), at INPE.


Locations of visitors to this page

QR Code
QR Code TerraME: Simulation and Modelling of Terrestrial Systems (generated for current page)