Package 'lidarflow'

Title: LiDAR processing tools
Description: A Processing function for LiDAR point clouds.
Authors: Tillman Reuter [aut, cre]
Maintainer: Tillman Reuter <[email protected]>
License: `use_gpl3_license()`
Version: 0.1.0
Built: 2026-11-20 17:12:03 UTC
Source: https://github.com/DryocopusMartius/lidarflow

Help Index


Process LiDAR Point Clouds using lasR

Usage

process_las(
  input_file,
  output_dir = NULL,
  drop_color = FALSE,
  clip_to = "none",
  x_center = NULL,
  y_center = NULL,
  radius = NULL,
  traj_path = NULL,
  buffer = NULL,
  denoise = FALSE,
  sor_k = NULL,
  sor_m = NULL,
  subsample = FALSE,
  distance = NULL,
  normalize = FALSE,
  start_res = 1,
  angle = 30,
  output_dtm = FALSE,
  output_below1m = FALSE,
  output_unnormalized = FALSE,
  dtm_res = 0.5,
  ncores = NULL,
  verbose = TRUE
)

Arguments

input_file

Character. Path to the input .las or .laz file.

output_dir

Character. Path to the directory where output files will be saved. If NULL, defaults to the directory of the input file.

drop_color

Logical. If TRUE, RGB color information is discarded to save compute. Defaults to FALSE.

clip_to

Character. Defines the clipping strategy. Options:

  • "none": No clipping (default).

  • "circle": Clip to a circular area.

  • "traj": Clip to the buffered convex hull of a trajectory file.

x_center

Numeric. X coordinate of the circle center (required if clip_to = "circle").

y_center

Numeric. Y coordinate of the circle center (required if clip_to = "circle").

radius

Numeric. Radius of the clipping circle in meters (required if clip_to = "circle").

traj_path

Character. Path to a CSV file containing trajectory points (required if clip_to = "traj"). Expected columns: ID, X, Y.

buffer

Numeric. Buffer distance in meters to apply around the trajectory hull.

denoise

Logical. If TRUE, applies Statistical Outlier Removal (SOR) to classify and remove noise.

sor_k

Integer. Number of neighbors for SOR filter. Defaults to package standard if NULL.

sor_m

Numeric. Standard deviation multiplier for SOR filter.

subsample

Logical. If TRUE, applies Poisson disk subsampling.

distance

Numeric. Minimum 3D distance between output points (meters) for subsampling.

normalize

Logical. If TRUE, performs ground classification and normalizes heights (Z relative to ground).

start_res

Numeric. Initial resolution for Progressive TIN Densification (PTD).

angle

Numeric. Maximum angle (degrees) for PTD iteration.

output_dtm

Logical. If TRUE, generates and saves a Digital Terrain Model (GeoTIFF).

output_below1m

Logical. If TRUE, saves a separate point cloud containing only points below 1 meter height.

output_unnormalized

Logical. If TRUE, saves a copy of the point cloud before normalization.

dtm_res

Numeric. Resolution of the output DTM in meters.

ncores

Integer. Number of CPU cores to use. If NULL, automatically detects and uses 90\

\item

verboseLogical. If TRUE, prints progress messages to the console.

Invisibly returns the result of the lasR::exec call. Output files are written to disk as side effects.

This function performs a standardized processing workflow on LAS/LAZ files. It supports clipping, denoising, subsampling, ground classification, normalization, and derivative product generation (DTM, height slices). It utilizes the lasR package for the main pipeline and lidR for specific pre-processing tasks like trajectory-based clipping.