A wrapper function to gDelaunayTriangulation() to perform Delaunay triangulation with additional options to specify thresholds for suppressing long sided triangles

get_tri(
  input,
  x,
  y,
  crs = "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0",
  qTSL = 0.975
)

Arguments

input

A data frame of locations with at least information on longitude and latitude coordinates of the locations.

x

A character value specifying the variable name of the longitude information in input.

y

A character value specifying the variable name of the latitude information in input.

crs

A character value specifying the coordinate reference system to be used for Delaunay triangulation. Default is longlat projection with datum WGS84 ("+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0")

qTSL

Maximum side length to be allowed to draw sides of triangles. Value can be between 0 to 1. Default value is 0.975.

Value

A SpatialPolygons object of Delaunay triangulation of input data

Examples

#