las_compression: Compression of the point cloud

las_compressionR Documentation

Compression of the point cloud

Description

Package rlas 1.6.0 supports compact representation of non populated attributes. For example UserData is usually populated with zeros (not populated). Yet it takes 32 bits per point to store each 0. With rlas 1.6.0 it can now use 644 bits no matter the number of points loaded if it is not populated or populated with a unique value.

Usage

las_is_compressed(las)

las_size(las)

Arguments

las

A LAS object.

Details

las_is_compressed test each attributes and returns a named vector with TRUE if the attribute is compressed FALSE otherwise.

las_size returns the true size of a LAS object by considering the compression. object.size from base R does not account for ALTREP and consequently cannot measure properly the size of a LAS object

Examples

LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las = readLAS(LASfile)
las_is_compressed(las)

format(object.size(las), units = "MB")
format(las_size(las), units = "MB")


lidR documentation built on Sept. 11, 2024, 5:21 p.m.