Description Usage Arguments Value Note Author(s) Examples
View source: R/impactFunctions.R
Prepares an input raster for change simulation. The raster values represent surface classifications. The simulation will aggregate change according to the classifications.
1 | prepareChangeRaster(rRaster, spatialList, shapeData = NULL)
|
rRaster |
The raster to prepare for simulation. Raster must have integer values representing the desired classifications. |
spatialList |
The list returned from |
shapeData |
Optional list used in conjunction with call to |
List with the matrix version of raster with required spatial extents, number of classifications present, and integer classification values.
Edited by CDMartinez 8 Feb 17
Created by CDMartinez 21 Oct 16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | library(raster)
OGasmt = continuousAssessment(auMC = 50000,
auType = 'Gas',
auProbability = 1,
auAreaProductive = c(2220000,2800000,3742000),
auAreaDrainage = c(10,20,40),
auPercAreaUntested = c(93,96,99),
auPercAreaSweet = c(100,100,100),
auPercFutureSS = c(80,92,94),
auEURss = c(0.15,0.4,0.65),
auLGR = c(.08,.5,1),
year = 2012)
rBase = raster(resolution = c(10,10), xmn = 0, xmx = 100, ymn = 0, ymx = 100)
values(rBase) = seq(1:100)
points = rbind(c(30, 40), c(30, 50), c(40, 50), c(40, 60), c(50, 60), c(60, 60),
c(60, 50), c(50, 50), c(50, 40), c(40, 40), c(30, 40))
shape = spPolygons(points)
plot(rBase)
lines(shape)
prepSpatial = prepareSimSpatial(rBase,shape, OGasmt)
rOwnerTypes <- raster(matrix(sample(1:4, 225, replace = TRUE), nrow = 15),
xmn = -500, xmx = 2500, ymn = -500, ymx = 2500)
prepOwnerTypes <- prepareChangeRaster(rRaster = rOwnerTypes, spatialList = prepSpatial)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.