Description Usage Arguments Value Examples
Divides the region of interest in a grid of a specific cell size.
1 | grid_from_region(region, cell_size, complete_cover = TRUE)
|
region |
SpatialPolygonsDataFrame of the region of interest. Object must be unprojected, World Geodetic System (WGS84). |
cell_size |
(numeric) resolution for grid (single number or vector of two numbers) in kilometers (km). |
complete_cover |
(logical) whether or not to include cells of grid partially overlapped with region. Default = TRUE. |
Gridded SpatialPolygonsDataFrame for the region of interest. Each grid cell is related to a specific ID and longitude and latitude coordinates.
1 2 3 4 5 6 7 8 | # Data
data("mx", package = "biosurvey")
# Create grid from polygon
grid_reg <- grid_from_region(region = mx, cell_size = 100)
sp::plot(grid_reg)
grid_reg
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.