lawn_tin: Create a Triangulated Irregular Network

View source: R/tin.R

lawn_tinR Documentation

Create a Triangulated Irregular Network

Description

Takes a set of data-Point's and the name of a z-value property and creates a Triangulated Irregular Network (TIN).

Usage

lawn_tin(pt, propertyName = NULL, lint = FALSE)

Arguments

pt

Input points.

propertyName

(character) Name of the property from which to pull z values. This is optional: if not given, then there will be no extra data added to the derived triangles

lint

(logical) Lint or not. Uses geojsonhint. Takes up increasing time as the object to get linted increases in size, so probably use by default for small objects, but not for large if you know they are good geojson objects. Default: FALSE

Details

Data returned as a collection of Polygons. These are often used for developing elevation contour maps or stepped heat visualizations.

This triangulates the points, as well as adds properties called a, b, and c representing the value of the given propertyName at each of the points that represent the corners of the triangle.

Value

TIN output, as a data-FeatureCollection.

See Also

Other interpolation: lawn_hex_grid(), lawn_isolines(), lawn_planepoint(), lawn_point_grid(), lawn_square_grid(), lawn_triangle_grid()

Examples

pts <- lawn_random(bbox = c(-70, 40, -60, 60))
lawn_tin(pts)
## Not run: 
lawn_tin(pts) %>% view
lawn_tin(lawn_random(bbox = c(-70, 40, -60, 10))) %>% view

## End(Not run)

ropensci/lawn documentation built on May 18, 2022, 9:58 a.m.