View source: R/HaltonFunctions.r
shape2Frame | R Documentation |
Take a shapefile as a sf object and clips boxes from a Halton frame around it. Size of those boxes is chosen by choosing J, the number of base 2,3 powers to subdivide. Intended for internal use but can be useful in other context.
shape2Frame( shp, bb = NULL, base = c(2, 3), J = c(2, 2), projstring = NULL, rotate = FALSE )
shp |
shape as spatial features object to wrap into Halton frame. |
bb |
Master Sample bounding box. |
base |
Co-prime base for BAS, do not change from 2,3. |
J |
Definition for the number of grid cells of Halton frame. |
projstring |
Projection that the master sample is in, can be passed as part of the bounding box. |
rotate |
Boolean if you want to rotate shape before exporting. |
rotated sf spatial object.
## Not run: bb <- getBB() data(NS_bioregion) haltonBoxes <- shape2Frame(shp = NS_biogregion, J = c(6,4), bb = bb) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.