This function attributes to each spygen survey it's closest waypoint at the date of the survey.
spygen_waypoint(eDNA_metadata_path, waypoints, distance_threshold, path_save)A character indicating eDNA metadata path. These metadata includes spygen survey coordinates and dates.
A dataframe of waypoints coordinates.
A numeric indicating the maximal distance threshold in meter between a spygen survey coordinates and the closest waypoint coordinates.
A character indicating the path to save data.
A list of three dataframes :
"high distance" contain spygen survey with distance to the closest waypoints > distance_threshold;
"good distance" contain spygen survey with distance to the closest waypoints < distance_threshold;
"na survey" contain spygen survey with no attributed waypoints.