stitch_TLS_dir_to_LAS: Stitch TLS scans into single *.las

View source: R/clip_lidR_ctgs.R

stitch_TLS_dir_to_LASR Documentation

Stitch TLS scans into single *.las

Description

This function takes an input directory of TLS scans that are overlapping and a region of interest. The function loads, stitches, and clips all las data to the region of interest and outputs into a single file. Note that this should only be used on relatively small areas to avoid very large file sizes and memory errors. Plot sizes < 0.2 ha are recommended including buffer unless points are sparse. Note: script will keep only data columns which are common among all scans.

Usage

stitch_TLS_dir_to_LAS(
  ctg,
  out_las,
  roi,
  buffer = 10,
  max_scan_distance = 60,
  index = TRUE,
  scan_locations = NULL
)

Arguments

ctg

a LAScatalog object containing LAS files to be stitched

out_las

path for output *.las file

roi

an sf object denoting the region of interest. UTM units preferred

buffer

width of buffer to apply to roi using sf::st_buffer

max_scan_distance

maximum distance from scan to be included. Evaluated using find_las_centroid()

index

boolean. Also write a lax file to index the points in the files. see lidR::writeLAS

scan_locations

(optional) an sf object of scan centroids index the same as ctg. If scan_locations is NULL then scan locations will be found automatically

Examples

# Load LAScatalog and clip to a region of interest specified by an sf object
ctg = lidR::readLAScatalog('path/to/LASfiles/')
roi = sf::st_read('plot_boundary.shp')
stitch_TLS_dir_to_LAS(ctg, 'output_path.las', roi)

jbcannon/landecoutils documentation built on July 16, 2025, 10:17 p.m.