R/line_sample.R
line_sample.RdSample n points along lines with density proportional to a weight
line_sample(l, n, weights)
| l | The SpatialLines object along which to create sample points |
|---|---|
| n | The total number of points to sample |
| weights | The relative probabilities of lines being samples |
Other lines:
angle_diff(),
geo_toptail(),
is_linepoint(),
line2df(),
line2points(),
line_bearing(),
line_breakup(),
line_match(),
line_midpoint(),
line_segment(),
line_via(),
mats2line(),
n_sample_length(),
n_vertices(),
onewaygeo(),
points2line(),
toptail_buff(),
toptailgs(),
update_line_geometry()
#>weights <- l$All p <- line_sample(l, 50, weights)#> Warning: CRS object has comment, which is lost in output#> Warning: CRS object has comment, which is lost in output#> Warning: Discarded datum Unknown based on WGS84 ellipsoid in CRS definition#> Warning: CRS object has comment, which is lost in output#> Warning: CRS object has comment, which is lost in output#> Warning: Discarded datum Unknown based on WGS84 ellipsoid in CRS definition