impactsRoads: Calculate changes to raster dataset based on road placement

Description Usage Arguments Value Note Author(s) Examples

Description

Calculates changes to raster dataset based on random road placement.

Usage

1
impactsRoads(ecoInputs, roadsIn)

Arguments

ecoInputs

List returned from prepareChangeRaster or prepareChangeShape

roadsIn

List returned from placeRoads

Value

Vector of cumulative change for each unique classification specified in ecoInputs$ecoItems

Note

Edited by CDMartinez 8 Feb 17

Author(s)

Created by CDMartinez 28 June 16

Examples

 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
library(raster)
OGasmt <- continuousAssessment(auMC = 50,
                               auType = 'Gas',
                               auProbability = 1,
                               auAreaProductive = c(100,400,800),
                               auAreaDrainage = c(10,20,40),
                               auPercAreaUntested = c(93,96,99),
                               auPercAreaSweet = c(100,100,100),
                               auPercFutureSS = c(20,40,50),
                               auEURss = c(0.15,0.4,0.65),
                               auLGR = c(.08,.5,1),
                               year = 2016)

OGasmt <- convertAcre2sqMeter(OGasmt)

rBase <- raster(resolution = c(10,10), xmn = 0, xmx = 2000, ymn = 0, ymx = 2000)
values(rBase) <- sample(1:10, 40000, replace = TRUE)

points <- rbind(c(250,250),c(250,1750),c(1750,1750),c(1750,250),c(250,250))
shape <- SpatialPolygons(list(Polygons(list(Polygon(points)), 'auOutline')))

spatialPrep <- prepareSimSpatial(surfaceRaster = rBase, shape, OGasmt)
distributionPrep <- prepareSimDistributions(spatialPrep,wellsPerPad = 1,
padArea = 300, EA = OGasmt, numIterations=5)

nVertices <- 500
road1 <- cbind(seq(0, 2000, length.out = nVertices), seq(0, 100,
length.out = nVertices)*sin(seq(-pi, 1.5*pi, length.out = nVertices)) + 600)
road2 <- cbind(200*cos(seq(-pi, 1.5*pi, length.out = nVertices)) +
seq(200, 1800, length.out = nVertices), seq(0, 2000, length.out = nVertices))

prepRoads <- rbind(road1, road2, cbind(road1[,1],rev(road1[,2]) + 700))

pads <- placePads(distributionPrep, 5)
roadLength <- makeRoads(xyStarts = pads$xyPadCenter, roadNodes = prepRoads)
roads <- placeRoads(padsIn = pads, simList = distributionPrep, totalRoadLength = roadLength)

rHabitat <- rBase
prepHab <- prepareChangeRaster(rRaster = rHabitat, spatialList = spatialPrep)

padConversion <- impactsPads(ecoInputs = prepHab, padsIn = pads)
roadConversion <- impactsRoads(ecoInputs = prepHab, roadsIn = roads)

madorning/energySim0.1.0 documentation built on May 22, 2019, 2:23 p.m.