assignCatchments: assignCatchments

Description Usage Arguments Details Value

Description

assignCatchments Assigns a catchment to a site with a set of lat/lon points.

Usage

1
assignCatchments(sites, catchmentShapefile, catchmentID, projectionString)

Arguments

sites

dataframe containing 3 columns in specified order: 1)SiteID 2)Longitude 3)Latitude

catchmentShapefile

SpatialPolygonsDataframe of the catchment shapefile over which the points will be matched

catchmentID

a character vector of column name describing the catchment identifier in the shapefile (e.g. "FEATUREID" for NHDplusV2)

projectionString

a CRS string of the spatial data projection of the shapefile and site coordinates

Details

This function uses a spatial overlay to assign catchment IDs to sites with associated lat/lon points. If a point does not match any catchment, NA is returned

Value

Returns the input dataframe with the catchment ID appended (column 4)


Conte-Ecology/conteStreamTemperature documentation built on Oct. 12, 2021, 10:26 p.m.