r-lidar / lidR

Airborne LiDAR data manipulation and visualisation for forestry application
https://CRAN.R-project.org/package=lidR
GNU General Public License v3.0
582 stars 130 forks source link

readMSLAS then write produces corrupted files that segfault #708

Closed Jean-Romain closed 1 year ago

Jean-Romain commented 1 year ago

MRE with shipped data. Those data are not from multispectral data but allows to reproduce.

library(lidR)

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

f = tempfile(fileext = ".las")
writeLAS(las, f)

f2 = readLAS(f)
# segfault