get_tri: A wrapper function to 'gDelaunayTriangulation()' to perform...

Description Usage Arguments Value Examples

View source: R/get_tri.R

Description

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

Usage

1
2
3
4
5
6
7
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

1
#

validmeasures/spatialsampler documentation built on Oct. 16, 2021, 3:15 a.m.