prep_reach_dist: Calculate the distance from a well to each reach within a stream network. This function splits a polyline stream network up into a series of evenly spaced points and
calculates the distance from each of those points to a well.
Description
Calculate the distance from a well to each reach within a stream network. This function splits a polyline stream network up into a series of evenly spaced points and
calculates the distance from each of those points to a well.
a grouping variable with the name of each stream reach
dist
distance of a point on that stream reach to the well of interest
lat
latitude of that point
lon
longitude of that point
This data frame can be plugged directly into apportion_inverse, apportion_polygon (if latlon=T),
or apportion_web
Arguments
wel_lon
longitude of well
wel_lat
latitude of well
stream_shp
shapefile of stream reaches
reach_id
string indicating name of column in stream_shp that
stream_pt_spacing
distance between points used for sampling each stream reach. The actual distance
between points will be close to this (but not necessarily exact) due to sampling rounding error. The finer
spacing you use, the more accurate your results will be but the function will run slower and use more memory.
buffer_width
width of buffer around stream used to match points with polylines
nseed
seed for random number generator (this is used to convert stream polylines to points)