lawn_tin: Create a Triangulated Irregular Network

Description Usage Arguments Details Value See Also Examples

View source: R/tin.R

Description

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

Usage

1
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

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

Example output

<FeatureCollection>
  Bounding box: -69.4 40.1 -61.4 56.4
  No. features: 10
  No. points: 80
  Properties: NULL

lawn documentation built on Jan. 6, 2021, 5:07 p.m.