Terraflux Terraflux
Download

Change detection

16 operators. Inputs marked required must be connected or given; the others have defaults.

change.components#

The components of the difference between two maps of classes (Pontius & Santacruz 2014, diffeR's diffTablej and overallDiff through landschaft): of each class its gain (omission), persistence (agreement) and loss (commission), and the difference split into quantity, exchange and shift; overall too (the last row, class empty).

InputTypeWhat it is
frommapthe earlier (or compared) map
tomapthe later (or reference) map
mapsrasterelse a series of maps: from its first to its last
OutputTypeWhat it is
tabletableper class and overall: the components
overalltablequantity, exchange, shift, allocation, overall (cells)
SettingTypeWhat it is
analysistextchange (default: gain, persistence, loss) or error

change.composite#

The cross-tabulation of two maps at a coarser resolution by the composite method (diffeR's composite through landschaft, Pontius & Cheuk 2006): each block of factor x factor cells a mix of classes, the agreement of a class the smaller of its two shares, the rest shared among the pairs of classes; blocks with a missing cell or cut by the edge left out. Proportions of the domain.

InputTypeWhat it is
comprequiredmapthe comparison map (rows)
refrequiredmapthe reference map (columns)
OutputTypeWhat it is
tabletablea row per class of either map: its class, then the shares
SettingTypeWhat it is
factorrequiredintegercells per side of a block

change.count#

How many times each cell changed along a series of maps of classes (OpenLand's acc_changes through landschaft): a map of the counts (none where any map has no value) and the cells of each count.

InputTypeWhat it is
mapsrequiredrasterthe maps of classes, a layer per date (two at least)
OutputTypeWhat it is
mapmapthe changes of each cell
tabletablePxValue (the count), Qt (cells), Percent
SettingTypeWhat it is
timesanythe dates of the maps (default: the layers' names, else 0, 1...)
cell_areanumbera cell's area in m2 (default: the cells' sides)

change.crosstab#

The transition matrix between two maps of classes (landschaft's crosstab, diffeR's crosstabm): the cells of each class of the first (rows) that hold each class of the second (columns); classes found in neither left out.

InputTypeWhat it is
fromrequiredmapthe earlier (or compared) map
torequiredmapthe later (or reference) map
OutputTypeWhat it is
tabletablea row per class of the first map: its class, then the cells to each

change.fad#

The change of fragmentation between two dates measured by FAD at several scales, as GuidosToolbox's Change -> FAD Multiscale (landschaft's fad_multiscale_change): FAD-MS of both maps, and at every window and for the average the cells moved between the classes background, rare, patchy, transitional, dominant, interior and intact; the change of the average FAD (FAD_AV, AVCON).

InputTypeWhat it is
beforerequiredmapthe map at the first date (FAD's input)
afterrequiredmapthe map at the second date
OutputTypeWhat it is
matrixtableper scale (its window, 0 the average) and class at A (0 background .. 6 intact): the cells in each class at B
statstableper scale: the foreground at A, at B, in both, in the same class and in another, the % whose fragmentation decreased and increased, FAD_AV and AVCON at A and B and their changes
reporttextthe average's report as GTB's FAD_change_mscale.txt
SettingTypeWhat it is
foregroundanythe foreground's classes (a class or a list)
windowsanythe windows' sides in cells, odd (default 7 13 27 81 243)

change.fos#

The change of fragmentation between two FOS maps (fragmentation.fos, or FAD) of the same windows, as GuidosToolbox: on the foreground of both dates 100 + its connectivity before - after (100 no change, above 100 a loss of connectivity, below 100 a gain), 250 foreground gained, 251 lost, 252 stable background, 254 missing; and how the foreground moved between the classes rare to intact.

InputTypeWhat it is
beforerequiredmapthe FOS map at the first date
afterrequiredmapthe FOS map at the second date
OutputTypeWhat it is
mapmapthe change in GTB's codes
statstablethe foreground gained and lost, stable background, the common foreground, in the same class and in another, and the % of it whose fragmentation decreased and increased
classestablethe common foreground from each class (rows, rare to intact) to each (columns)

change.intensity#

The intensity analysis of land change (Aldwaik & Pontius 2012) as OpenLand's intensityAnalysis through landschaft: at the interval level how fast the map changed in each period against a uniform rate; at the category level each class's gains and losses against the period's rate (active or dormant); at the transition level which classes the gains of one class (gain) take, and which take the losses of another (loss), against uniform (targeted or avoided); with the stationarity of each along the periods. Rates in % a year (a time unit); areas in km2 or cells.

InputTypeWhat it is
mapsrequiredrasterthe maps of classes, a layer per date (two at least)
OutputTypeWhat it is
intervaltableper period: PercentChange, St (the period's rate), U (the uniform rate)
category_gaintableper period and class: its gross gain, Gtj, St
category_losstableper period and class: its gross loss, Lti, St
transition_gaintablethe gains of gain from each class: area, Rtin, Wtn (uniform)
transition_losstablethe losses of loss to each class: area, Qtmj, Vtm (uniform)
category_gain_stationaritytableper class: periods active (above 1) or dormant (0), every one (test)
category_loss_stationaritytableper class: periods active (1) or dormant (0) losing
transition_gain_stationaritytableper class: periods targeted (1) or avoided (0) by gain's gains
transition_loss_stationaritytableper class: periods targeting (1) or avoiding (0) loss's losses
SettingTypeWhat it is
timesanythe dates of the maps (default: the layers' names, else 0, 1...)
cell_areanumbera cell's area in m2 (default: the cells' sides)
gainrequirednumberthe class whose gains the transition level examines
lossrequirednumberthe class whose losses the transition level examines
areaboolareas in km2 (default) or in cells

change.mad#

The mean absolute deviation between two continuous maps and its components (diffeR's MAD through landschaft): the deviation split into quantity (its mean), strata (deviations that cancel within each stratum) and element (the rest), at the maps' resolution and at blocks of 2, 4, 8... cells (sums of the deviations).

InputTypeWhat it is
grid1requiredmapthe first map
grid2requiredmapthe second map (subtracted)
stratamapstrata (0 and missing outside every one; default one)
OutputTypeWhat it is
tabletableMultiples, Resolution, Quantity, Strata, Element, Total
SettingTypeWhat it is
multipleboolevery resolution (default) or the maps' only

change.memberships#

The share of each class in each block of factor x factor cells (diffeR's memberships through landschaft: terra's segregate and aggregate by the mean); blocks with a missing cell, and those cut by the right and bottom edges, have none.

InputTypeWhat it is
maprequiredmapa map of classes
OutputTypeWhat it is
stackstacka layer per class, on the grid of the blocks
SettingTypeWhat it is
factorintegercells per side of a block (default 2)

change.morphological#

Morphological change detection, as GuidosToolbox: the change of the foreground between two dates told apart from the spurious change at its edges (a shift of a cell, a misregistration): 11 stable background, 12 gain, 21 loss, 22 stable foreground, 176 spurious, 255 missing. The foreground is the classes given, or the maps are coded 0 missing, 1 background, 2 foreground.

InputTypeWhat it is
beforerequiredmapthe map at the first date
afterrequiredmapthe map at the second date
OutputTypeWhat it is
mapmapthe change in GTB's codes
statstablethe foreground at each date, the net change, the cells of each kind of change, and the elasticity (the rate of the core's change over the foreground's)
SettingTypeWhat it is
foregroundanythe foreground's classes (a class or a list)

change.mosaic#

The change of the landscape mosaic's heatmap between two dates, as GuidosToolbox's Change -> Landscape Mosaic Heatmap (landschaft's landscape_mosaic_change): the share of every class of 103 at both dates and B - A, the triangle of the change, GTB's delta_heatmap.csv.

InputTypeWhat it is
beforerequiredmapthe land cover at the first date
afterrequiredmapthe land cover at the second date
OutputTypeWhat it is
heatmaptableper class of 103: its share at A and B, the change, its class of 19
trianglemapthe change on GTB's triangle (12 x 21)
heatmap_csvtextGTB's delta_heatmap.csv
SettingTypeWhat it is
agricultureanythe land cover's classes of it (a class or a list)
naturalanythe land cover's classes of it (a class or a list)
developedanythe land cover's classes of it (a class or a list)
windowintegerthe window's side in cells, odd (default 27)

change.resolutions#

The quantity, exchange and shift differences between two maps at coarser and coarser resolutions (diffeR's differenceMR through landschaft): the cross-tabulation at the maps' resolution, then the composite one at blocks of factor, factor^2... cells per side up to the larger side; shift shrinks as the resolution coarsens, quantity stays.

InputTypeWhat it is
comprequiredmapthe comparison map
refrequiredmapthe reference map
populationtablecategory, size: to scale the first matrix
OutputTypeWhat it is
tabletableMultiples, Resolution, Quantity, Exchange, Shift, Overall
SettingTypeWhat it is
factorintegerthe growth of a block's side (default 2)
percentboolin % of the domain (default) or proportions

change.sample_to_population#

A sample's cross-tabulation scaled to the population of each row's class (diffeR's sample2pop through landschaft, by the row's class rather than its position): each row times its population over its sum.

InputTypeWhat it is
matrixrequiredtablea cross-tabulation (change.crosstab): class, then the counts
populationrequiredtablecategory, size
OutputTypeWhat it is
tabletablethe matrix scaled

change.simple#

The change of the foreground between two dates, as GuidosToolbox: 11 stable background, 12 gain, 21 loss, 22 stable foreground, 255 missing at either date. The foreground is the classes given, or the maps are coded 0 missing, 1 background, 2 foreground.

InputTypeWhat it is
beforerequiredmapthe map at the first date
afterrequiredmapthe map at the second date
OutputTypeWhat it is
mapmapthe change in GTB's codes
statstablethe cells of stable background, gain, loss, stable foreground and missing, and those with data
SettingTypeWhat it is
foregroundanythe foreground's classes (a class or a list)

change.suggest#

The transitions worth modelling, from the first map of a series to the last: every change of a class to another with its cells, its share of all the change and of the class's area, the largest first; suggested those that make at least least % of the change (the others are too small to fit a model to).

InputTypeWhat it is
mapsrequiredrasterthe maps of classes, a layer per date (two at least)
OutputTypeWhat it is
tabletablefrom, to, cells, km2, of_change, of_class (%), suggested (1)
transitionsanythe transitions suggested, [[from, to], ...]
SettingTypeWhat it is
timesanythe dates of the maps (default: the layers' names, else 0, 1...)
cell_areanumbera cell's area in m2 (default: the cells' sides)
leastnumberthe least share of the change to suggest, % (default 1)

change.transitions#

The transitions of a series of maps of classes, as landschaft's changes (OpenLand's contingencyTable): between consecutive dates (and from the first to the last), a row per pair of classes with cells: the years, the classes, the area in km2 (cells times a cell's area) and the cells; and the cells of each class at each date.

InputTypeWhat it is
mapsrequiredrasterthe maps of classes, a layer per date (two at least)
OutputTypeWhat it is
tabletableyear_from, year_to, from, to, km2, cells, interval
one_steptablethe same, from the first date to the last
areastablethe cells of each class at each date
matrixtablethe transition matrix from the first date to the last
SettingTypeWhat it is
timesanythe dates of the maps (default: the layers' names, else 0, 1...)
cell_areanumbera cell's area in m2 (default: the cells' sides)