Learn R Programming

CrownScorchTLS (version 0.1.1)

remove_stem: Remove tree bole from `LAS`

Description

This function identifies and removes tree boles using the `TreeLS` package available at https://github.com/tiagodc/TreeLS

Usage

remove_stem(las)

Value

LAS object with stem removed

Arguments

las

`LAS` object from `lidR` package representing an individually segmented tree

Examples

Run this code
library(lidR)
library(CrownScorchTLS)

#'  #download external data from github repo
url <- paste0(
  "https://raw.githubusercontent.com/jbcannon/CrownScorchTLS-data/main/data/manual-clip-trees/",
  "M-04-15549_post.laz")
 las_file = tempfile(fileext = paste0(".", tools::file_ext(url)))
 download.file(url, las_file, mode = "wb", quiet = TRUE)
 las <- readLAS(las_file)

 # or load your own data
 #las <- readLAS('C:/path/to/your/file.laz')

#plot(las)
crown_only = remove_stem(las)
#plot(crown_only)

Run the code above in your browser using DataLab