setBASIndex | R Documentation |
This function is designed to be called internally for efficiency in site selection.
setBASIndex(shapefile, bb, seeds = base::c(0, 0))
shapefile |
Shape file as a polygon (sp or sf) to select sites for. |
bb |
Bounding box which defines the area around the study area. A bounding box must be supplied. |
seeds |
A vector of 2 seeds, u1 and u2. seeds must have a value when this function is called. |
To be used when doing a Master Sample and the bounding box of the greater frame is potentially much larger than the the polygon being sampled. In this case, we don't want to generate points across the entire larger bounding box region and then clip them. Instead, we can make use of the Halton sequence and only generate BAS points near to the shape being sampled. This function finds returns those indices.
A list containing two variables, $boxes
containing indices of the BAS sample that fall
into the bounding box, $J
, the number of subdivision powers taken to find those boxes, $B
,
the number of boxes that the indices relate to (1-B)
, $xlim
, the ylimit of the
bounding box of the shapefile, shifted to the base[1]^J[1]
coordinates on the unit box
[0,1)
, $ylim
, the ylimit of the bounding box of the shapefile, shifted to the
base[2]^J[2]
coordinates on the unit box [0,1)
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.