aoi_snap | R Documentation |
Adjusts the area of interest to the nearest 100m. Note that this package assumes to data is in a metric equal area projection.
aoi_snap(aoi, method = "shrink")
aoi |
is a sf object (e.g. polygon). The bounding box of the shape will be used to create rectangular shape. |
method |
Options are shrink or expand. Shrink will snap the aoi in to the nearest 100m, Expand will snap the aoi out to the nearest 100m. |
This is an essential first step. As subsequent co-variate layers will be generated at multiple resolutions (e.g. 5, 10, 25m^2) and then disaggregate'd back to the lowest resolution. Having the aoi set 100m break-points facilitates this.
## Load sf object aoi_raw <- sf::st_read(dsn = "../data/Block_aoi.gpkg", quiet = TRUE) ## snap aoi to nearest 100m aoi_snap(aoi_raw) ## ## [1] "initial extent is:" ## xmin ymin xmax ymax ## 559691.2 5994955.0 560687.0 5995832.5 ## [1] "Expanded extent is:" ## xmin ymin xmax ymax ## 559600 5994900 560700 5995900
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.