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

View source: R/methods.R

treeMap.positionsR Documentation

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

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)

tiagodc/TreeLS documentation built on June 29, 2023, 7:40 p.m.