geo_to_barycentric_coords: Polyline segment & polygon triangle geometries to barycentric...

Description Usage Arguments Value Author(s) Examples

View source: R/barycentric.R

Description

Polyline segment & polygon triangle geometries to barycentric coordinates

Usage

1

Arguments

segments

sf line object

triangles

sf triangle polygons

Value

matrix of coordinates, b1, b2, b3

Author(s)

Leland Scantlebury

Examples

1
2
3
4
5
6
# Read in shapefiles
str <- read_sf(system.file("extdata", "MehlandHill2010_stream.shp", package = "pbjr"))
tri <- read_sf(system.file("extdata", "720_triangles.shp", package = "pbjr"))

# Run function with one segment, one triangle
geo_to_barycentric_coords(seg_geo = str[1,]$geometry, tri_geo = tri[120,]$geometry)

scantle/pbjr documentation built on Dec. 22, 2021, 10:19 p.m.