Closed PiusHauenstein closed 8 months ago
Please share a empty file. I cannot produce an empty file with las2las. It does not write empty files. I don't know how you produced an empty file. Thanks
You can produce one with "lasduplicate -keep_class xx", xx must be a not existing class in the input file
Ok the problem is less serious than expected. I though that it crashed when reading 0 point but it only produced a regular errors and stop.
f = "issue 711/empty.las"
las = lidR::readLAS(f)
lidR::las_check(las)
You can get rid of empty files to fix you problem upstream. This is what I will implement as a first layer of protection. I will also exit las_check()
early for 0 point LAS objects
ctg = ctg[ctg$Number.of.point.records > 0,]
fixed
if las_check should analyze an empty las-file, it crashes:
Empty las-files can happen, if you process a chunk of files previously for example with lastools with a filter condition