[Liblas-devel] Updating header information when writing a .laz
martin.isenburg at gmail.com
Thu Oct 27 10:09:53 EDT 2011
not sure at which point in liblas the call "LASzipper::close()" is
happening. but if you move the stream pointer to update the LAS header
before that call then you will corrupt the LAZ output. the
"LASzipper::close()" flushes the remaining compressor bytes and writes
the chunking table. so if you move the stream pointer, make sure you
move it back.
On Thu, Oct 27, 2011 at 7:04 AM, Peder Axensten <Peder.Axensten at slu.se> wrote:
> Maybe I've missed something, but liblas doesn't seem to update the header information when closing a file it has been writing to.
> So I have created a class that handles this in its destructor. The problem is that although it works on uncompressed (.las) files, this corrupts compressed (.laz) files. I guess that supplying a header with the correct information already when creating the file would work, but usually the info (e.g. bounding box, number of points by return) is not available then.
> Are there any plans to make liblas update the header information 'automagically'?
> Is the issue with corrupt .laz files known?
> I've tried it on 1.7.0b2 and on the latest (this morning) from git.
> Best regards,
> Peder Axensten
> Research engineer
> Swedish University of Agricultural Sciences
> Dept. of Forest Resource Management
> Forest Remote Sensing
> Liblas-devel mailing list
> Liblas-devel at lists.osgeo.org
More information about the Liblas-devel