newLandscapeDim | R Documentation |
resample the landscape to new dimensions given by continuous scaling number fac
newLandscapeDim(rs, fac = 1)
rs |
a raster brick object to resample |
fac |
is a number that is multiplied times the number of cols to calculate new dims |
Takes a raster brick and resamples into a new resolution more coarse than the current raster brick resolution. fac
is a factor on the interval 0-1 that determines how many cells in the new raster brick, relative to the original raster brick. For example, fac = 0.5
would take the number of cells in each dimension in the original raster brick and reduce the same extent into 50
Raster brick with resolution specified by the combination of the input landscape (rs
) and the rescaling parameter (fac
)
ashSetupLandscape
, def_grid_pred2
, getpophist2.cells
library(holoSimCell)
rs <- raster::brick(system.file("extdata/rasters/ccsm_160kmExtent_maxent.tif", package = "holoSimCell"))
newrs <- newLandscapeDim(rs,0.45)
land <- def_grid_pred2(pred=newrs, samps=transSampLoc(pts, range.epsg=4326, raster.proj=crs(rs)@projargs), raster.proj=crs(rs)@projargs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.