1

Should I assume that the following error occurs because the file is corrupt? Is there any way I can get more information out of this file?

bad_las <- readLAS("~/Downloads/3102_309374.las")
#> ERROR: reading 151140850 bytes of data into header.evlrs[0].data
#> ERROR: cannot open lasreaderlas with file name '/Users/lucasj/Downloads/3102_309374.las'
#> Error: LASlib internal error. See message above.
#> ERROR: reading 151140850 bytes of data into header.evlrs[0].data
#> ERROR: cannot open lasreaderlas with file name '/Users/lucasj/Downloads/3102_309374.las'
#> Error in C_reader(ifiles, ofile, select, filter, filter_wkt) : 
#>   LASlib internal error. See message above.
packageVersion("lidR")
#> [1] ‘3.0.5’
packageVersion("rlas")
#> [1] ‘1.3.7’

UPDATE lasinfo and las2txt produce the following error:

ERROR: reading 151140850 bytes of data into header.evlrs[0].data
ERROR: cannot open lasreaderlas with file name '3102_309374.las'
ERROR: could not open lasreader
1
  • 1
    Can lasinfo or las2txt from lastools read the file? – JRR Dec 28 '20 at 19:50
2

This looks like the same issue I reported here (which is still open, so there's no solution in rlas yet). Ultimately, I had to use lastools' las2las (on an entire acquisition) to loop through and read/rewrite all the files and it fixed it. Based on that issue on github, I've been contacted by a few others and the las2las approach worked for them too...

3
  • 1
    This means that an update of laslib in rlas should fix the issue – JRR Jan 9 at 22:23
  • This doesn't seem to work for me. las2las produces the same errors as above with las2txt and lasinfo. – Lucas Jan 12 at 0:43
  • Update lastools and if this does not help your file is definitively corrupted in a irrecoverable way – JRR Jan 14 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.