View source: R/increase.stream.points.R
| increase.stream.points | R Documentation |
Takes a polyline shapefile and adds points along the line between the existing points. Thus, a long straight section with only one point on either end will have points added along its length. Increasing the number of points will improve the accuracy of distance calculations but will greatly reducing the speed of all functions.
increase.stream.points(l, freq = 1)
l |
(shapefile) A projected polyline loaded with st_read(). Should include an id variable specifying different segments of the stream (this should be included even if there is only a single segment) |
freq |
(numeric) Default = 1. The distance (in meters) to add points. |
If you encounter a "LINESTRING EMPTY" warning, it means that your input shapefile had an ID for a segment that contained no data, and that segment was removed.
A data frame of points consisting of three columns: lon (longitude), lat (latitude), id = stream segment identities (from the input shapefile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.