Description Usage Arguments Value Other Functions Required Author(s)
This function select a GRTS sample of a linear resource. The function uses hierarchical randomization to ensure that the sample will include no more than one point per cell and then picks a point in selected cells.
1 2 |
linframe |
The sf object containing attributes: id, mdcaty, and mdm. |
samplesize |
Number of points to select in the sample. The default is 100. |
SiteBegin |
First number to start siteID numbering. The default is 1. |
shift.grid |
Option to randomly shift the hierarchical grid. The default is TRUE. |
startlev |
Initial number of hierarchical levels to use for the GRTS grid, which must be less than or equal to maxlev (if maxlev is specified) and cannot be greater than 11. The default is NULL. |
maxlev |
Maximum number of hierarchical levels to use for the GRTS grid, which cannot be greater than 11. The default is 11. |
Data frame of sample points containing: siteID, id, x, y, mdcaty, and weight.
numLevelsdetermines the number of levels for hierarchical randomization
constructAddrconstructs the hierarchical address for sample points
ranhoconstructs the randomized hierarchical address for sample points
pickGridCellsselects grid cells that get a sample point
insideLinearGridCelldetermines feature ID value and clipped linestring length for each feature contained in a selected grid cell
selectFeatureIDidentifies a feature ID from which to select a sample point
pickSamplePointsselects sample points from an sf object
Tom Kincaid Kincaid.Tom@epa.gov
Tony Olsen Olsen.Tony@epa.gov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.