View source: R/createAggregationGrid.R
createAggregationGrid | R Documentation |
createAggregationGrid
Creates a regular stars grid, which can be used for aggregating an sf polygon sfc.
createAggregationGrid(
object = asgerbachelor::ecoregions_L0,
delta = 50000,
crs = st_crs(2163)
)
object |
a sf object with a bounding box which can be obtained via sf::st_bbox. |
delta |
numeric. Width of cells in the grid (in the units of the supplied crs). |
crs |
an object of class crs. Desired coordinate reference system (CRS) of the output grid. |
The created grid is centered on (0,0)
An object of class stars with 2 dimensions and 1 attribute, ID, which is unique for each grid cell.
It is important that the supplied CRS is uses a equal area projection, to avoid spatial biases in the size of the aggregation cells.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.