Learn R Programming

spanner (version 1.0.2)

compute_pcv: Compute PCV (Portion de Ciel Visible) for point cloud

Description

Calculates ambient occlusion using sky visibility algorithm. Based on Duguet & Girardeau-Montaut (2004).

Usage

compute_pcv(las, radius = 1, num_directions = 60, ncpu = 4)

Value

Numeric vector of PCV values (sky visibility) for each point

Arguments

las

LAS object

radius

Numeric radius for neighborhood search

num_directions

Integer number of directional rays to cast

ncpu

Integer number of CPUs to use for parallel processing

Details

The PCV algorithm computes the visible portion of the sky from each point by:

  • Casting rays in multiple directions around each point

  • Computing the maximum elevation angle (horizon) in each direction

  • Calculating the average sky visibility across all directions

This function uses an optimized C++ implementation with OpenMP parallelization for improved performance on large point clouds.