Gitmaxwell / lastools

‘lastools’ is an R package for reading and writing version 1.2 and version 2.0 Log ASCII Standard (LAS) and for performing common functions on LAS
Other
12 stars 2 forks source link

fix test for v1.2 sample minimal las file #6

Closed dcslagel closed 4 years ago

dcslagel commented 4 years ago

@Gitmaxwell,

The minimal v1.2 doesn't have header names in the data section.

So the solution is to remove the hard coded 'headers = TRUE' from data.table::fread(). By default a header line will be created only if the first data line has all fields of type 'character'. This solution also works with the v1.2 sample.las which has a header data row. An extra test is added to the sample.las test to make sure this change doesn't break parsing sample.las.

Let me know if this change could be accepted (or rejected) or needs some additional changes before merging.

Thanks,

DC