link_waterbody_centroids: Link geopoints to Waterbodies by centroids

Description Usage Arguments Value Examples

Description

Link geopoints to a waterbody with the closest centroid a geospatial dataset

Usage

1
2
link_waterbody_centroids(lats, lons, ids, dataset = c("nhdh", "nhdplusv2",
  "hydrolakes"), buffer = 25)

Arguments

lats

Vector of point latitudes

lons

Vector of point longitudes

ids

Vector of point identifiers (string or numeric)

dataset

Character name of dataset to link against. Can be either "nhd" or "hydrolakes"

buffer

maximum distance between points and centroids to match

Value

Water body permanent IDs

Examples

1
2
3
4
5
6
7
## Not run: 
centroidpt = c(33.655277, -117.834007)

#should be item ID 126859554
link_waterbody_centroids( centroidpt[1], centroidpt[2], 'dummyid', dataset='nhdh')

## End(Not run)

lawinslow/hydrolinks documentation built on June 1, 2019, 7:37 a.m.