Draws a simple random sample from a
SpatialLines* object. The
SpatialLines* object represents a 2-dimensional line resource, such as a
river, highway, or coastline.
Sample size. Number of points to draw from the set of all lines
x contains multiple lines, the lines are amalgamated before
sampling. Conceptually, under amalgamation the lines in
"stretched" straight and laid end-to-end in order of appearance in
The simple random sample is then drawn from the amalgamated line.
Once drawn from the 1-D amalgamated line, sample points are mapped back
to 2-dimensional space to fall on the lines in
Note that the line is not discretized prior to sampling. The sample points are selected from the set of continuous lines that contain an infinite number of points (up to machine precision anyway).
SpatialPointsDataFrame containing locations in the SRS sample, in
order along the amalgamated line. Those on line 1 appear first, those on line 2
second, etc. Attributes of the sample points (in the
embedded data frame) are
sampleID: A unique identifier for every sample point.
sampleID starts with 1 at the first point and
increments by one for each.
sample points along the amalgamated line.
geometryID: The ID of the lines object in
x on which each
sample point falls. The
ID of lines in
Any attributes of the original lines (in
x) on which each sample
Additional attributes of the output object, beyond those which
make it a
frame: Name of the input sampling frame.
frame.type: Type of resource in sampling frame. (i.e., "line").
sample.type: Type of sample drawn. (i.e., "SRS").
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.