View source: R/SILOThiessenShp.R
SILOThiessenShp | R Documentation |
Function to generate Thiessen polygons from SILO sites
SILOThiessenShp(SILOdata, path, shpname, boundary = NULL)
SILOdata |
|
path |
|
shpname |
|
boundary |
|
A simple feature geometry (sf::sfc object) of the polgyons created. Shape file saved to path \ shpname
If boundary is specified weights are written to the attribute table of the polygon return, which can be extracted with
st_drop_geometry(returnedfeature[c("Station","weights")])
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.