lawn_planepoint: Calculate a Planepoint

Description Usage Arguments Details Value See Also Examples

View source: R/planepoint.R

Description

Takes a triangular plane as a data-Polygon and a data-Point within that triangle and returns the z-value at that point.

Usage

1
lawn_planepoint(pt, triangle, lint = FALSE)

Arguments

pt

The Point for which a z-value will be calculated.

triangle

A Polygon feature with three vertices.

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

The Polygon needs to have properties a, b, and c that define the values at its three corners.

Value

The z-value for pt (numeric).

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
pt <- lawn_point(c(-75.3221, 39.529))
triangle <- '{
  "type": "Feature",
  "properties": {
    "a": 11,
    "b": 122,
    "c": 44
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [[
      [-75.1221, 39.57],
      [-75.58, 39.18],
      [-75.97, 39.86],
      [-75.1221, 39.57]
    ]]
  }
}'
lawn_planepoint(pt, triangle)

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