Description Usage Arguments Value Author(s) Examples
A convenience function to help simplify very large aggregate HUCs.
1 | simplifyHucs(subhucPoly, coordThresh = 50000, simpTol = 5e-05)
|
subhucPoly |
A subset of HUCs for the region in questioned. |
coordThresh |
A threshold number of nodes above which polygons will be simplified. |
simpTol |
A tolerance to pass into the Douglas-Peuker algorith. |
The subhucPoly data frame with large polygons simplified.
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"))
hucList<-testhucPoly@data$HUC12
fromHUC<-sapply(hucList,fromHUC_finder,hucs=testhucPoly@data$HUC12,tohucs=testhucPoly@data$TOHUC)
aggrHUC<-sapply(hucList, HUC_aggregator, fromHUC=fromHUC)
testhucPoly<-unionHUCSet(aggrHUC, fromHUC, testhucPoly)
plot(subset(testhucPoly,testhucPoly@data$HUC12 %in% "070900020504"))
testhucPoly<-simplifyHucs(testhucPoly,coordThresh=0,simpTol = 1e-2)
plot(subset(testhucPoly,testhucPoly@data$HUC12 %in% "070900020504"), add=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.