Description Usage Arguments Value Examples
Produce a etrs aggregating point data
1 2 | etrsPoint2Grid(obj = "SpatialPointsDataFrame", point.value.col = "numeric",
cell.size = "numeric", mean.flag = FALSE)
|
obj |
a SpatialPointsDataFrame object |
point.value.col |
The value that is going to be aggregated |
cell.size |
the resolution of the grid |
mean.flag |
False for |
SpatialPointsDataFrame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | xc <- round(runif(10, min = 4321000, max = 4323000), 2)
yc <- round(runif(10, min = 3210000, max = 3212000), 2)
xy <- cbind(xc, yc)
xy.sp <- SpatialPoints(xy, proj4string = CRS("+init=epsg:3035"))
df<-as.data.frame(rep(1,length(xy.sp)))
colnames(df)<-"VALUE"
xy.sp<-SpatialPointsDataFrame(xy.sp,df)
aGrid <- etrsPoint2Grid(obj = xy.sp, point.value.col=1,cell.size = 1000,mean.flag =FALSE)
X11(width = 10,10)
split.screen(figs=c(1,2))
screen(1)
plot(aGrid)
title("Some Points ...")
plot(xy.sp,add=TRUE,pch=21,bg=rgb(1,0,0,.1),cex=xy.sp[["VALUE"]])
screen(2)
plot(aGrid)
plot(gCentroid(etrsGrid2Spdf(aGrid),byid=TRUE),add=TRUE,pch=21,bg=rgb(1,0,0,.1),cex=aGrid[["VALUE"]])
title(paste("aggregated in the",aGrid@the.grid.name))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.