powered by
Link geopoints to a waterbody with the closest centroid a geospatial dataset
link_waterbody_centroids(lats, lons, ids, dataset = c("nhdh", "nhdplusv2", "hydrolakes"), buffer = 25)
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 "nhd" or "hydrolakes"
maximum distance between points and centroids to match
Water body permanent IDs
# NOT RUN { centroidpt = c(33.655277, -117.834007) #should be item ID 126859554 link_waterbody_centroids( centroidpt[1], centroidpt[2], 'dummyid', dataset='nhdh') # } # NOT RUN { # }
Run the code above in your browser using DataLab