unionHUC: Union HUC

Description Usage Arguments Value Author(s) Examples

View source: R/unionHUC.R

Description

Aggregates geometry for a set of HUCs.

Usage

1
unionHUC(huc, upstreamHUCs, hucPoly)

Arguments

huc

The huc in question

upstreamHUCs

A list of HUCs to be aggregated into one geometry

hucPoly

An imported shapefile with all the HUC geometry

Value

An aggregated polygon

Author(s)

David Blodgett dblodgett@usgs.gov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
load(system.file("extdata","testhucpoly.rda",package="HUCAgg"))
plot(testhucPoly)
hucList<-testhucPoly@data$HUC12
fromHUC<-sapply(hucList,fromHUC_finder,hucs=testhucPoly@data$HUC12,tohucs=testhucPoly@data$TOHUC)
aggrHUCs<-sapply(hucList, HUC_aggregator, fromHUC=fromHUC)
huc<-"070900020904"
outhucPoly<-unionHUC(huc, aggrHUCs, testhucPoly)
plot(outhucPoly, add=TRUE, col=rgb(1,0,0,.3))

## End(Not run)

jread-usgs/HUCAgg documentation built on May 20, 2019, 10:45 a.m.