Tag Archives: cellular automata

SIMLANDER v.1.0.3 and 1.0.4 – Model updated September 2014

SIMLANDER R script versions 1.0.3 and 1.04

In Version 1.03, the selection of highest values from the transition potential map has been rewritten. Instead of extracting values through a GetValues command and then sorting, which I found difficult to code properly, the data are converted to a matrix, output to a dataframe (primarily to facilitate checking but also to make it easy to write out an excel file if desired) and then passed back to matrix again (almost certainly could be done in fewer lines of code, but it does work). A new raster is then generated with the highest values as “1” (urban land). This is the replacement code:

#Select the highest 164 values from the TTP map
#r1demand <- 164  #this is the number of cells we want to allocate from r1
x <- as.matrix(TTP)
n <- urbdemand1  #the demand, calculated by a countdown procedure, above
x2 <-  sort(-x, partial = n)
x2h <-  -sort(x2[1:n])
ix <- which(x %in% x2h)
ro <- ix %% 1151
ro <- ifelse(ro == 0L, 1151, ro)
co <- 1 + ix %/% 1151
x3 <- x[ix]
d <- data.frame(row = ro, col = co, x = x3)
result <- d[rev(order(d$x)), ]
#———————–
#turn selected 164 values in the dataframe into a matrix and then to a raster
x.mat <- matrix(0, 1151, 749) #create a matrix with the right number of rows and columns and fill with 0 values
#x.mat[cbind(result$row,result$col)] <-result$x   #works just fine.
x.mat[cbind(result$row,result$col)] <-1   #but actually we want values to be 1 (urban land), not the TP value.
#which(!is.na(x.mat), arr.ind =TRUE)  #pick out the non-NA values. Useful for testing that this has actually worked.
r <- raster(x.mat)
e <- extent(c(150938,225838,4070192,4185292))
extent(r) <- e

As in previous versions, new land to be allocated is calculated by: (urban cells in final map-urban cells in initial map/number of years). The new land to be allocated at each time step is then added to the existing urban land from the previous step. If this is not what you want, look at version 1.0.4.

SIMLANDER R script version 1.0.4

In Version 1.04, which includes all the updates made in version 1.0.3,  the principal change relates to the way the land is allocated at each time step.

Instead of adding the new land (calculated by urban cells in final map-urban cells in initial map/number of years) to be allocated at each time step (e.g as in version 1.03) now the model allocates all of the urban land cells in the map at each time step, according to the results of the transition potential calculation. The total urban land in each time step is calculated by taking the cell count for urban from the initial map and then increasing the cells allocated at each time step until the final desired demand is reached.

This means that each time step is effectively a blank sheet, and that urban land can, if necessary disappear between time steps. Though there may be few cases in which this is desirable, this is much closer to the way that original CA models (like the game of life) work.

 

Advertisements

A cellular-automata land use model for the R software environment

Though there are a number of Free and Open Source Software (FOSS) applications presently available for other types of land use models, such as Huang’s Change Analysis (logistic regression), and Purdue University’s Land Transformation Modeller (LTM) (Artificial Neural Networks), there are few fully operational implementations of true CA models for land use modelling in the Open Source community. In addition, stand alone model frameworks do not usually incorporate  appropriate statistical goodness-of-fit comparison techniques for model evaluation, something that is normally carried out externally in statistical software packages.

This website is dedicated to the development of SIMLANDER (SIMulation of LAnd use changE using R) , a CA land use model for the R software environment. The R platform, with its extensive developer and user community, and its clear relevance for model building and scientific computing, seems to present an ideal environment for geographical land use modelling.

BIBLIOGRAPHY

Batty, M., and Xie, Y. (1994). From cells to cities. Environment and Planning B: Planning and Design 21 Supplement, 31–48.

Tobler, W. (1979), Cellular Geography, S. Gale & G. Olsson, eds., Philosophy in Geography, Reidel, Dortrecht; pp 379-386.

White, R., and Engelen, G. (1993). Cellular automata and fractal urban form: a cellular modelling approach to the evolution of urban land-use patterns. Environment and Planning A, 25(8), 1175–1199.
Image