Description Usage Arguments Details Value Author(s) See Also Examples
Draws a simple random sample from a SpatialPolygons or
SpatialPolygonsDataFrame object.
1 | srs.polygon(x, n)
|
x |
A |
n |
Sample size. Number of locations to draw from the union of all
polygons contained in |
The SRS sample is drawn by generating uniform random deviates
for coordinates in the bounding box surrounding polygons
(e.g., c(xmin, ymin) + c(dx,dy)*runif(2)), tossing
locations outside polygons
until the required number is achieved.
A SpatialPointsDataFrame containing locations in the SRS sample,
in arbitrary order. Attributes of the sample points (in the
embedded data frame) are
as follows:
sampleID: A unique identifier for every sample point.
geometryID: The ID of the polygon in x which each
sample point falls. The
ID of polygons in x are row.names(geometry(x)).
Any attributes of the original polygons (in x).
Additional attributes of the output object, beyond those which
make it a SpatialPointsDataFrame, are:
frame: Name of the input sampling frame.
frame.type: Type of resource in sampling frame. (i.e., "polygon").
sample.type: Type of sample drawn. (i.e., "SRS").
Trent McDonald
bas.polygon, sss.polygon,
hip.polygon, sdraw
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.