powered by
Link geopoints to waterbodies in a geospatial dataset. Use the point-in-polygon technique with user-selectable polygon buffer size.
link_to_waterbodies(lats, lons, ids, dataset = c("nhdh", "hydrolakes", "nhdplusv2"), buffer = 0)
Vector of point latitudes
Vector of point longitudes
Vector of point identifiers (string or numeric)
Character name of dataset to link against. Can be either "nhdh", "hydrolakes", or "nhdplusv2"
Numeric width of polygon buffer in m
Water body permanent IDs
# NOT RUN { latlon = c(43.108728, -89.418293) # } # NOT RUN { #returns linked waterbody site information for that lat/lon link_to_waterbodies(latlon[1], latlon[2], 'id1', dataset = 'nhdh') # }
Run the code above in your browser using DataLab