Learn R Programming

TreeLS (version 2.0.2)

treeMap.positions: Convert a tree map to a 2D data.table

Description

Extracts the tree XY positions from a treeMap output.

Usage

treeMap.positions(map, plot = TRUE)

Arguments

map

object generated by treeMap.

plot

logical - plot the tree map?

Value

signed data.table of tree IDs and XY coordinates.

Examples

Run this code
# NOT RUN {
file = system.file("extdata", "pine_plot.laz", package="TreeLS")
tls = readTLS(file) %>%
  tlsNormalize %>%
  tlsSample

x = plot(tls)

map = treeMap(tls, map.hough(h_step = 1, max_h = 4))
add_treeMap(x, map, color='red')

xymap = treeMap.positions(map)
# }

Run the code above in your browser using DataLab