SILOThiessenShp: Function to generate Thiessen polygons from SILO sites

Description Usage Arguments Value Examples

View source: R/SILOThiessenShp.R

Description

Function to generate Thiessen polygons from SILO sites

Usage

1
SILOThiessenShp(SILOdata, path, shpname)

Arguments

SILOdata

- data loaded from SILO based on site list

path

- file path to save Thiessen polygon shapefile

shpname

- filename to save ESRI shapefile (no extension)

Value

A simple feature geometry (sf::sfc object) of the polgyons created. Shape file saved to path \ shpname

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 
## Not run: 
X<-SILOLoad(c("24001","24002","24003"),path="./SWTools/extdata")
p<-SILOThiessenShp(X,tempdir(),"Theissens")
a<-SILOSiteSummary(X)
ggplot(p)+geom_sf(aes(fill=AnnualRainfall))+
geom_point(data=a,aes(Longitude,Latitude))+
geom_text(data=a,aes(Longitude,Latitude,label=Site),nudge_y = 0.02)

## End(Not run)

SWTools documentation built on Sept. 6, 2021, 9:09 a.m.