mesh_to_2d {habtools} | R Documentation |
Transform 3D mesh into 2D outline
Description
Turns a 3D Mesh file into an xy data frame.
Usage
mesh_to_2d(mesh, L0 = NULL, plot = FALSE, silent = TRUE)
Arguments
mesh |
A mesh3d object. |
L0 |
(Optional) The desired DEM resolution in same units at the 3D mesh. |
plot |
logical. Plot the output? |
silent |
logical. Defaults to not showing warnings. |
Details
The function uses the vertices of the mesh object and projects them on the XY plane. Then, only points that define the perimeter of the shape are maintained.
Value
A data frame.
Examples
mcap_2d <- mesh_to_2d(mcap, plot = TRUE)
geometry::polyarea(mcap_2d$x, mcap_2d$y) # area
planar(mcap)
perimeter(mcap_2d) # perimeter
circularity(mcap_2d) # circularity
fd_boxes(mcap_2d) # fractal dimension
[Package habtools version 1.0.5 Index]