setLansdcape {landsepi} | R Documentation |
Set the landscape
Description
Updates a LandsepiParams object with a sp or sf object as landscape.
Usage
setLandscape(params, land)
Arguments
params |
a LandsepiParams Object. |
land |
a landscape as sp or sf object |
Details
The landscape should be a sp or sf object. Built-in landscape are available using
loadLandscape
.
See our tutorial (vignettes) for details on how to use your own landscape.
If the landscape contains only polygons, croptypes can be allocated later using
allocateLandscapeCroptypes
.
Otherwise the landscape has to contain a data.frame specifying for every year, the index
of the croptype cultivated in each polygon.
Each features has a field identified by "year_XX" (XX <- seq(1:Nyears+1)) and containing
the croptype ID.
Features/fields | year_1 | year_2 | ... year_Nyears+1 |
polygons1 | 13 | 10 | 13 |
polygonsX | 2 | 1 | 2 |
Value
a LandsepiParams object.
See Also
Examples
## Not run:
simul_params <- createSimulParams()
simul_params <- setLandscape(simul_params, loadLandscape(1))
simul_params@Landscape
## End(Not run)
[Package landsepi version 1.4.0 Index]