Skip to contents

Creates a map of a catchment with Thiessen / Voronoi polygons overlayed

Usage

teeSunPlot(
  gaugeCoords,
  intersectPoly,
  polyCol = c("green", "yellow", "red"),
  pointCol = "orangered"
)

Arguments

gaugeCoords

Coordinates of rain gauges set as a polygon shapefile

intersectPoly

Catchment shapefile

polyCol

Set colours for the polygons

pointCol

Set colour for the points

Value

An interactive Thiessen polygon map

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)
int <- intersectPoly(coords = gcs,
                     voronoi = bewdTeeSun,
                     catchment = bewdCatch)
vPlot <- teeSunPlot(gaugeCoords = gcs,
                         intersectPoly = int)
vPlot