get_shape_by_id: Link IDs to warterbody shapefiles

Description Usage Arguments Value Examples

Description

Get shapefiles containing waterbodies with specified IDs. If one argument is provided, no other arguments will be used to filter. Arguments are checked in order: PERMANENT_match, GNIS_ID_match, GNIS_NAME_match, REACHCODE_match.

Usage

1
2
get_shape_by_id(match_id, feature_type = c("flowline", "waterbody"),
  dataset = c("nhdh", "nhdplusv2", "hydrolakes"), match_column)

Arguments

match_id

ids of features to be matched.

feature_type

name of feature layer to match. The hydrolakes dataset does not include a flowline layer.

dataset

name of dataset to use for matching.

match_column

index containing match ids. Defaults to dataset ID column. Columns indexed by dataset:

nhdh nhdplusv2 hydrolakes
PERMANENT_ COMID Hylak_id
GNIS_ID GNIS_ID Lake_name
GNIS_NAME GNIS_NAME
REACHCODE REACHCODE

Value

simple features object containing polygons with associated IDs.

Examples

1
2
3
4
5
6
7
8
## Not run: 

library(sf)
shp = get_shape_by_id('143249470', feature_type = 'waterbody', dataset='nhdh')
plot(st_geometry(shp), col='blue')


## End(Not run)

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