# \donttest{
LASfile <- system.file("extdata", "ALS_Clip.laz", package="spanner")
las <- readLAS(LASfile, select = "xyz")
# Attribute-based coloring
las_colored <- colorize_las(las, method="attr", attribute_name="Z",
palette=c("blue", "green", "yellow", "red"))
# Raster-based coloring with RGB file
rgb_file <- system.file("extdata", "UAS_Clip_RGB.tif", package="spanner")
las_colored <- colorize_las(las, method="rgb", raster_path=rgb_file)
# PCV ambient occlusion (slow, high quality)
las_colored <- colorize_las(las, method="pcv", radius=1.0,
num_directions=30, palette=c("black", "white"))
# SSAO ambient occlusion (faster alternative to PCV)
las_colored <- colorize_las(las, method="ssao", pixel_size=0.1,
kernel_size=5, num_samples=16, palette=c("black", "white"), ncpu=8)
# }
Run the code above in your browser using DataLab