Description Usage Arguments Value Author(s) Examples
Polyline segment & polygon triangle geometries to barycentric coordinates
1 | geo_to_barycentric_coords(segments, seg_triangles)
|
segments |
sf line object |
triangles |
sf triangle polygons |
matrix of coordinates, b1, b2, b3
Leland Scantlebury
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.