r-lidar / rlas

R package to read and write las and laz files used to store LiDAR data
https://cran.r-project.org/package=rlas
GNU General Public License v3.0
34 stars 14 forks source link

read.las – ERROR: 'end-of-file … #35

Closed jaanusremm closed 5 years ago

jaanusremm commented 5 years ago

Hi, Get error if trying to read data from LAZ file. Only a minor part of the data set is successfully read. ‘rlas’ version 1.3.1

library(rlas)
las.data <- read.las(files='581536_2018_mets.laz')

#> ERROR: 'end-of-file during chunk with index 0' after 39690 of 1004249 points

581536_2018_mets.laz.zip

Jean-Romain commented 5 years ago

Thank you for reporting. On my side I have the same with rlas 1.3.2. It looks like a corrupted file but lastools is able to read it and parse into .txt and to uncompress into .las.

I can investigate but honestly I have few hope to find the issue. It all comes from LASlib the C++ library that is internally used to read the files. The only thing I can test is to update LASlib but it is a long and boring job.

For now I suggest you to uncompressed your file to .las with a recent version of laszip. This is what I just did and I was able to correclty read the .las file.

jaanusremm commented 5 years ago

It works. At least on the first try. Thanks :)

Jean-Romain commented 5 years ago

Should work on the second try as well :wink:. I'll try to update LASlib in May to see if that solves the issue.

Jean-Romain commented 5 years ago

Fixed by updating LASlib as I guessed.

jaanusremm commented 5 years ago

(y)

Jean-Romain commented 5 years ago

Well it is not currently working on Windows. See #37