LAS(): creates objects of class LAS. The original data is updated by reference to quantize the coordinates according to the scale factor of the header if no header is provided. In this case the scale factor is set to 0.001
Slots
crs: Object of class crs from sf.
data: Object of class data.table . Point cloud data according to the LAS file format
header: Object of class LASheader . LAS file header according to the LAS file format
index: list. See spatial indexing .
Examples
# Read a las/laz fileLASfile <- system.file("extdata","example.laz", package="rlas")las <- readLAS(LASfile)las
# Creation of a LAS object out of external datadata <- data.frame(X = runif(100,0,100), Y = runif(100,0,100), Z = runif(100,0,20))# 'data' has many decimal digitsdata
# Create a default header and quantize *by reference*# the coordinates to fit with offset and scale factorscloud <- LAS(data)# 'data' has been updated and coordinates were quantizeddata
cloud
# Be careful when providing a header the function assumes that# it corresponds to the data and won't quantize the coordinatesdata <- data.frame(X = runif(100,0,100), Y = runif(100,0,100), Z = runif(100,0,20))header <- header(las)# This works but triggers warnings and creates an invalid LAS objectcloud <- LAS(data, header)las_check(cloud)