GRASS logo

Note: This addon document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade your GRASS GIS installation, and read the current addon manual page.


r.futures.demand - Script for creating demand table which determines the quantity of land change expected.


raster, demand


r.futures.demand --help
r.futures.demand development=name[,name,...] subregions=name observed_population=name projected_population=name simulation_times=integer[,integer,...] method=string[,string,...] [plot=name] demand=name [separator=character] [--overwrite] [--help] [--verbose] [--quiet] [--ui]


Allow output files to overwrite existing files
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog


development=name[,name,...] [required]
Names of input binary raster maps representing development
subregions=name [required]
Raster map of subregions
observed_population=name [required]
CSV file with observed population in subregions at certain times
projected_population=name [required]
CSV file with projected population in subregions at certain times
simulation_times=integer[,integer,...] [required]
For which times demand is projected
method=string[,string,...] [required]
Relationship between developed cells (dependent) and population (explanatory)
Options: linear, logarithmic, exponential, exp_approach, logarithmic2
Default: linear,logarithmic
linear: y = A + Bx
logarithmic: y = A + Bln(x)
exponential: y = Ae^(BX)
exp_approach: y = (1 - e^(-A(x - B))) + C (SciPy)
logarithmic2: y = A + B * ln(x - C) (SciPy)
Save plotted relationship between developed cells and population into a file
File type is given by extension (.pfd, .png, .svg)
demand=name [required]
Output CSV file with demand (times as rows, regions as columns)
Separator used in CSV files
Special characters: pipe, comma, space, tab, newline
Default: comma

Table of contents


The r.futures.demand module of FUTURES determines the quantity of expected land changed. It creates a demand table as the number of cells to be converted at each time step for each subregion based on the relation between the population and developed land in the past years.

The input accepts multiple (at least 2) rasters of developed (category 1) and undeveloped areas (category 0) from different years, ordered by time. For these years, user has to provide the population numbers for each subregion in parameter observed_population as a CSV file. The format is as follows. First column is time (matching the time of rasters used in parameter development) and first row is the category of the subregion. The separator can be set with parameter separator.


The same table is needed for projected population (parameter projected_population). The categories of the input raster subregions must match the identifiers of subregions in files given in observed_population and projected_population. Parameter simulation_times is a comma separated list of times for which the demand will be computed. The first time should be the time of the developed/undeveloped raster used in r.futures.pga as a starting point for simulation. There is an easy way to create such list using Python:

','.join([str(i) for i in range(2015, 2031)])
or Bash:
seq -s, 2015 2030

The format of the output demand table is:

where each value represents the number of new developed cells in each step. It's a standard CSV file, so it can be opened in a text editor or a spreadsheet application if needed. The separator can be set with parameter separator. In case the demand values would be negative (in case of population decrease or if the relation is inversely proportional) the values are turned into zeros, since FUTURES does not simulate change from developed to undeveloped sites.

The method parameter allows to choose the type of relation between population and developed area. The available methods include linear, logarithmic (2 options), exponential and exponential approach relation. If more than one method is checked, the best relation is selected based on RMSE. Recommended methods are logarithmic, logarithmic2, linear and exp_approach. Methods exponential approach and logarithmic2 require scipy and at least 3 data points (raster maps of developed area).

An optional output plot is a plot of the relations for each subregion. It allows to more effectively assess the relation suitable for each subregion. Format of the file is determined from the extension and can be for example PNG, PDF, SVG.

Figure: Example of different relations between population and developed area (generated with option plot). Starting from the left: exponential, linear, logarithmic with 2 unknown variables, logarithmic with 3 unknown variables, exponential approach


r.futures.demand computes the relation between population and developed area using simple regression and in case of method exp_approach and logarithmic2 using scipy.optimize.curve_fit. It is possible to manually create a custom demand file where each column could be taken from a run with most suitable method.


r.futures.demand development=urban_1992,urban_2001,urban_2011 subregions=counties \
observed_population=population_trend.csv projected_population=population_projection.csv \
simulation_times=`seq -s, 2011 2035` plot=plot_demand.pdf demand=demand.csv


FUTURES, r.futures.pga, r.futures.devpressure, r.futures.potential, r.futures.calib, r.sample.category



Anna Petrasova, NCSU GeoForAll

Last changed: $Date: 2018-09-14 21:49:22 -0400 (Fri, 14 Sep 2018) $


Available at: r.futures.demand source code (history)

Latest change: Monday Nov 01 12:13:58 2021 in commit: 1a9c817b17fa46763fab60da21db214ed9ff6cb1

Note: This addon document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade your GRASS GIS installation, and read the current addon manual page.

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2023 GRASS Development Team, GRASS GIS 7.8.9dev Reference Manual