Hi R- Reserchers
To improve my analysis i need a raster with 0.5 x 0.5 of resolution.
I use this code but I tried several solution to find the right command to
obtain 0.5x0.5 resolution
Thanks
Ale
dem.area <-
(ground at bbox[1,2]-ground at bbox[1,1])*(ground at bbox[2,2]-ground at bbox[2,1]) #A#
makes the dem area
dem.pixelsize <- round(sqrt(dem.area/length(ground$Z)),0) #A# makes the
cell size
dem.pixelsize
[1] 1
dem.grid <-
GridTopology(cellcentre.offset=c(ground at bbox[1,1],ground at bbox[2,1]),
cellsize=c(dem.pixelsize,dem.pixelsize),
cells.dim=c(round((ground at bbox[1,2]-ground at bbox[1,1])/dem.pixelsize,0),round
((ground at bbox[2,2]-ground at bbox[2,1])/dem.pixelsize,0)))