Makes a grid adapted to the purpose of this package and simplifying options
from the sf
package. The central concept of the BIRDS package is the
definition of the field visit, and most likely, your grid size will define the
maximum area a person can explore during a day. Use the function
exploreVisits()
to assess if your definition of visit aligns with your
grid size.
makeGrid(
poly,
gridSize,
hexGrid = TRUE,
offset = NULL,
buffer = FALSE,
simplify = FALSE,
tol = 0.01
)
an object of class ‘sf’, ‘SpatialPolygon’ or ‘SpatialPolygonDataFrame’
width of the cells in Km. It defines the central assumption of this package that is the maximum area a person can explore during a day. Be aware, that the spatial extent of a visit is dependent on the taxonomic group, and many other variables. Maximum recommended for this package 10 km if there is no reliable definition for the spatial extent for visits.
shall the grid cells be hexagonal? Then TRUE
(default).
Else squared grid cells.
numeric of length 2 with lower left corner coordinates (x, y)
of the grid. If it is left empty (NULL
, default), then takes default
values st_bbox(x)[c("xmin", "ymin")]
.
shall the grid cells include the polygon border? Then TRUE
(default = FALSE
).
simplifies the polygon geometry. Complicated polygons (those with much detail) make this function run slower.
numerical tolerance value for the simplification algorithm. Set to 0.01 as default.
an object of class ‘sf’ with a set of polygons conforming to a grid of equal-area cells, with geodesic coordinates in WGS84 (ESPG:4326).
# NOT RUN {
grid <- makeGrid(gotaland, gridSize = 10)
# }
Run the code above in your browser using DataLab