| new_csquares | R Documentation |
Creates a spatial raster (stars) with c-square codes for a specified bounding box,
using a specified resolution. The raster will be conform c-squares specifications.
new_csquares(x, resolution = 1, crs = 4326)
x |
An object of class |
resolution |
Resolution (in WGS84 degrees) to be used for creating c-squares codes. As per c-square specifications, the resolution should be 10 or less, yet greater than 0. It should be a tenfold of 1 or 5. Valid resolutions are therefore: 10, 5, 1, 0.5, 0.1, etc. |
crs |
The projection to be used for the created grid. By default it is WGS84 (EPSG:4326). |
Returns a stars and csquares object based on the provided bounding box and
resolution.
Pepijn de Vries
library(sf)
nc <- st_read(system.file("shape/nc.shp", package = "sf"))
new_csquares(nc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.