View source: R/calc_prediction_sites.R
calc_offset | R Documentation |
Recursive function to calculate the offset from the downstream
junction needed to place points with fixed distance along the streams.
It is called by calc_prediction_sites
for each
outlet and should not be called by the user.
calc_offset(dt, id, offs, dist)
dt |
data.table containing the attributes of the stream segments |
id |
integer; 'stream' of the stream segment |
offs |
number; offset from outlet of the stream segment (downstream); equals the length of the segment if the point shall be placed directly at the downstream junction. |
dist |
number giving the distance between the points to create in map units. |
Nothing; change 'offset' in dt.
Mira Kattwinkel, mira.kattwinkel@gmx.net
## Not run: outlets <- dt.streams[next_str == -1, stream] netID <- 1 for(i in outlets){ calc_offset(dt.streams, id = i, offs = 0, dist = 200) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.