Snap sites to streams and calculate attributes
prepare_sites(sites_map, locid_c = NULL, pid_c = NULL, maxdist = NULL)
character; name of sites map (observation or prediction sites)
as created by import_data
.
character (optional); column name in the sites attribute table giving a unique site identifier.
character (optional); column name in the sites attribute table that distinguishes between repeated measurements at a sampling site.
integer (optional); maximum snapping distance. Sites farther away from edges will be deleted.
This function is called by calc_sites
and should not be called directly.
Sites are snapped to the streams and upstream distance is calculated.