This function attributes to each spygen survey it's closest tracks at the date of the survey.
spygen_tracks(waypoints, gps_tracks, distance_threshold, path_save)A dataframe, the "good_distance" one obtained with the "spygen_waypoint" function.
A dataframe of tracks coordinates.
A numeric indicating the maximal distance threshold in meter between a spygen survey coordinates and the closest tracks coordinates.
A character indicating the path to save data.
A list of three dataframe :
"high distance" contain spygen survey with distance to the closest tracks > distance_threshold;
"good distance" contain spygen survey with distance to the closest tracks < distance_threshold;
"na survey" contain spygen survey with no attributed tracks.