Description Usage Arguments Value Examples
the default method that creates an EtrsAncillary Surface Object
1 2 | etrsAncillarySurface.default(input.surface, over.method.type, surface.value.col,
cell.size, binary)
|
input.surface |
A SpatialPolygonsDataFrame object that represents a ancillary dataset to be used to redistribute VALUE. The output from this tool can be used in as an input to |
over.method.type |
"PropCal" in proportional calculation the cell takes a calculated value depending on the values of the units falling inside and their share within the cell. This method seems very appropriate for countable variables |
surface.value.col |
the number of colum that keeps the relative density of a cell with land-cover some type |
cell.size: |
one of the resolutions of the grid that is 0.5m, 1m, 2.5m, 5m, 10m, 25m, 50m, 100m, 250m, 500m, 1Km, 2.5Km, 5Km, 10Km, 25Km, 50Km, 100Km |
an EtrsAncillarySurface Object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #' # test EtrsAncillarySurface -------------------------------------------------------
x <- round(runif(1, min = 4320200, max = 4322000), 1)
y <- round(runif(1, min = 3210000, max = 3212000), 1)
xy <- cbind(x, y)
size = round(runif(1,min = 500,max = 1000),0)
pl1 <-
Polygons(list(Polygon(cbind(
c(x,x + size,x + size,x,x),c(y,y,y + size,y + size,y)
))),round(runif(1,min = 1,max = 100),0))
x <- x + size
pl2 <-
Polygons(list(Polygon(cbind(
c(x,x + size,x + size,x,x),c(y,y,y + size,y + size,y)
))),round(runif(1,min = 1,max = 100),0))
ancS <-SpatialPolygons(list(pl1,pl2),proj4string = CRS("+init=epsg:3035"))
df <-data.frame(RelDens=c(0.15,0.85),bin=c(1,1),row.names = sapply(slot(ancS, "polygons"), function(x)slot(x, "ID")))
ancS<-SpatialPolygonsDataFrame(ancS,data = df)
ancS.grided<-etrsAncillarySurface(input.surface = ancS,over.method.type = "PropCal",surface.value.col = 1,cell.size = 500,binary = FALSE)
plot(ancS.grided,border=4,lwd=2)
plot(ancS,add=TRUE,col=rgb(0,.25,.3,.1))
text(coordinates(ancS)[,1],coordinates(ancS)[,2],paste("reDens=",ancS[[1]]))
text(coordinates(ancS.grided)[,1],coordinates(ancS.grided)[,2],paste("CELLVALUE=",ancS.grided[[4]]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.