unionHUC | R Documentation |
Aggregates geometry for a set of HUCs.
unionHUC(huc, upstreamHUCs, hucPoly)
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 |
An aggregated polygon
David Blodgett dblodgett@usgs.gov
## 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)) outhucPoly@data$AREAACRES ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.