link_to_waterbodies: Link geopoints to Waterbodies

Description Usage Arguments Value Examples

View source: R/link_to_waterbodies.R

Description

Link geopoints to waterbodies in a geospatial dataset. Use the point-in-polygon technique with user-selectable polygon buffer size.

Usage

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

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 "nhdh", "hydrolakes", or "nhdplusv2"

buffer

Numeric width of polygon buffer in m

Value

Water body permanent IDs

Examples

1
2
3
4
5
6
7
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')


## End(Not run)

lawinslow/nhdtools documentation built on May 20, 2019, 8:25 p.m.