Learn R Programming

rlas (version 1.0.3)

readlasdata: Read data from a .las or .laz file

Description

Read data from .las or .laz files in format 1 to 4 according to LAS specifications and returns a data.table labeled according to LAS specifications. See the ASPRS documentation for the LAS file format. The optional logical parameters enable the user to save memory by choosing to load only the fields they need. Indeed, the readlasdata function does not 'stream' the data. Data is loaded into the computer's memory (RAM) suboptimally because R does not accommodate many different data types.

Usage

readlasdata(file, Intensity = TRUE, ReturnNumber = TRUE, NumberOfReturns = TRUE, ScanDirectionFlag = TRUE, EdgeOfFlightline = FALSE, Classification = TRUE, ScanAngle = TRUE, UserData = TRUE, PointSourceID = TRUE, RGB = TRUE)

Arguments

file
characters path to the .las or .laz file
Intensity
logical. do you want to load the Intensity field? default: TRUE
ReturnNumber
logical. do you want to load the ReturnNumber field? default: TRUE
NumberOfReturns
logical. do you want to load the NumberOfReturns field? default: TRUE
ScanDirectionFlag
logical. do you want to load the ScanDirectionFlag field? default: TRUE
EdgeOfFlightline
logical. do you want to load the EdgeOfFlightline field? default: TRUE
Classification
logical. do you want to load the Classification field? default: TRUE
ScanAngle
logical. do you want to load the ScanAngle field? default: TRUE
UserData
logical. do you want to load the UserData field? default: TRUE
PointSourceID
logical. do you want to load the PointSourceID field? default: FALSE
RGB
logical. do you want to load R,G and B fields? default: TRUE

Value

A data.table

See Also

Other rlas: readlasheader, writelas

Examples

Run this code
lazfile <- system.file("extdata", "example.laz", package="rlas")
lasdata <- readlasdata(lazfile)

Run the code above in your browser using DataLab