las_add_scanner_distance: Add attribute 'Distance' to TLS returns based on distance...

View source: R/clip_lidR_ctgs.R

las_add_scanner_distanceR Documentation

Add attribute Distance to TLS returns based on distance from scanner

Description

This function takes the path of a .las or .laz file and return a LAS object containing the new attribute Distance represetning the distance to the scanner The scanner location is determined by (1) using the find_las_centroid() function, then (2) locates the scanner elevation by adding the distance from the scanner_ht parameter to the elevation of the centroid. Elevation is determined using the lidR::classify_ground and lidR::rasterize_terrain functions.

Usage

las_add_scanner_distance(las_filename, scanner_ht = 1.75, subsample = 1e+05)

Arguments

las_filename

path to a .las or .laz file

scanner_ht

height of scanner above ground. Defaults to 1.75

subsample

subsamplign factor used in find_las_centroid() to reduce lidar resoultion. Defaults to 1e05.

Examples


las_fn = 'data.laz'
las = las_add_scanner_distance(las_fn)
lidR::writeLAS(las, 'data_withDistance.laz')

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