Read .las or .laz files in format 1 to 4 according to LAS specification and return an object of class LAS
readLAS(files, Intensity = TRUE, ReturnNumber = TRUE,
NumberOfReturns = TRUE, ScanDirectionFlag = FALSE,
EdgeOfFlightline = FALSE, Classification = TRUE, ScanAngle = TRUE,
UserData = FALSE, PointSourceID = FALSE, RGB = TRUE, pulseID = TRUE,
flightlineID = FALSE, color = TRUE, XYZonly = FALSE, all = FALSE,
filter = "")
array of characters or a Catalog object
logical. do you want to load the Intensity field? default: TRUE
logical. do you want to load the ReturnNumber field? default: TRUE
logical. do you want to load the NumberOfReturns field? default: TRUE
logical. do you want to load the ScanDirectionFlag field? default: FALSE
logical. do you want to load the EdgeOfFlightline field? default: FALSE
logical. do you want to load the Classification field? default: TRUE
logical. do you want to load the ScanAngle field? default: TRUE
logical. do you want to load the UserData field? default: FALSE
logical. do you want to load the PointSourceID field? default: FALSE
logical. do you want to load R,G and B fields? default: TRUE
logical. do you want to compute the extra field pulseID? default: TRUE
logical. do you want to compute the extra field flightlineID? default: FALSE
logical. do you want to compute the extra field color? default: FALSE
logical. Overwrite all other options. Load only X, Y, Z fields. default: FALSE
logical. Overwrite all other options. Load everything. default: FALSE
character. filter data while reading the file (streaming filter) without allocating any additional memory. (see rlas::readlasdata).
A LAS object
If several files are given the returned LAS object is considered as one LAS file. The information retained in the header will be read from the first file in the list. The optional logical parameters enable the user to save memory by choosing to load only the fields they need. Indeed, the readLAS 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.
# NOT RUN {
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
lidar = readLAS(LASfile)
# }
Run the code above in your browser using DataLab