simplifyHucs: Simplify HUCs

Description Usage Arguments Value Author(s) Examples

View source: R/simplifyHucs.R

Description

A convenience function to help simplify very large aggregate HUCs.

Usage

1
simplifyHucs(subhucPoly, coordThresh = 50000, simpTol = 5e-05)

Arguments

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.

Value

The subhucPoly data frame with large polygons simplified.

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"))
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)

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