Skip to contents

Creates a Thiessen/Voronoi polygon shapefile.

Usage

teeSun(gaugeCoords, catchment = NULL)

Arguments

gaugeCoords

SF file with point data within.

catchment

Set as null, optional bounding box polygon derived from catchment polygon which is useful for large catchments

Value

A polygon shapefile with Thiessen polygons

Examples

library(riskyData)
data(crowle); data(bickley); data(barnhurst); data(hollies); data(ledbury);
data(bettwsYCrwyn); data(bewdCatch)

# Obtain gauge coordinates
gcs <- getCoords(crowle,
                 bickley,
                 barnhurst,
                 hollies,
                 ledbury,
                 bettwsYCrwyn)

bewdTeeSun <- teeSun(gaugeCoords = gcs, catchment = bewdCatch)

leaflet(bewdTeeSun) %>%
  addTiles() %>%
  addPolygons()
#> Error in addPolygons(.): could not find function "addPolygons"