Description Usage Arguments Value Author(s) Examples
Aggregates geometry for a large collection of HUCs. Note that subhucPoly must be all potential HUCs required.
1 | unionHUCSet(aggrHUCs, fromHUCs, subhucPoly)
|
aggrHUCs |
The list of aggregate HUCs to be processed per HUC_aggregator |
fromHUCs |
The list of 'fromHUCs' to be processed per fromHUC_finder |
subhucPoly |
A subset of HUCs for the region in questioned. |
The subhucPoly data frame with requested aggregated HUCs unioned together. Note that Polygon 'ID's are set to the HUC id and areas are added up appropriately.
David Blodgett dblodgett@usgs.gov
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)
testhucPoly<-unionHUCSet(aggrHUCs, fromHUC, testhucPoly)
plot(subset(testhucPoly,testhucPoly@data$HUC12 %in% "070900020904"), add=TRUE, col=rgb(1,0,0,.3))
plot(subset(testhucPoly,testhucPoly@data$HUC12 %in% "070900020702"), add=TRUE, col=rgb(1,1,0,.3))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.