mparkan / Digital-Forestry-Toolbox

A collection of digital forestry tools for Matlab/Octave
http://mparkan.github.io/Digital-Forestry-Toolbox/
GNU General Public License v3.0
46 stars 16 forks source link

LAS 1.4 files with a PDRF > 6 do not conform to the ASPRS LAS Format #9

Closed ghost closed 3 years ago

ghost commented 4 years ago

According the the LAS 1.4 Format R15, to maintain legacy compatibility, the header fields Legacy Number of Point Records & Legacy Number of Points by Return should contain the total number of point records and an array of point records per return if the Point Data Record Format is less than 6. These fields should be zero if greater than 6.

The check in line 2172 in LASWrite.m does not consider the PDRF and sets these header fields to zero if the LAS version is 1.4. This condition can be modified from:

if las_version < 14

to:

if arg.Results.recordFormat < 6

as both LAS 1.2 and 1.3 versions do not have record formats greater than 6.

mparkan commented 3 years ago

Thanks for reporting and sorry for the slow response. It should work now.