[pdal] Riegl extrabytes stripped

Kristian Evers kreve at sdfe.dk
Mon Oct 3 04:28:29 PDT 2016


Hi.

I have some laz-files that incoorporates Riegl's extrabytes waveform extension [0]. I am running the files through a PDAL pipeline but unfortunately the VLR header and extrabytes are stripped from the resulting files. This behavior of writers.las is documented on the webpage [1]. The forward options description ends with:

"VLRs can be forwarded by using the special value 'vlr'. VLRs containing the following User IDs are NOT forwarded: 'LASF_Projection', 'LASF_Spec', 'liblas', 'laszip encoded'. These VLRs are known to contain information regarding the formatting of the data and will be rebuilt properly in the output file as necessary. Unlike header values, VLRs from multiple input files are accumulated and each is written to the output file. Forwarded VLRs may contain duplicate User ID/Record ID pairs."

The Riegl extrabytes are stored with user ID "LASF_Spec" and record ID 4. I accept that it is necessary to treat some VLR's differently than others, but I don't think this is one of them. The extra-bytes in this case contains data that PDAL has no way of knowing how to reconstruct properly. I believe something similar happens when storing waveform data as specified in LAS v. 1.3 since it is also defined as VLR's with user ID "LASF_Spec" (and record ID in the interval 100-355).

I would much prefer the extrabytes attached to each record just be forwarded like any other VLR and extrabytes data. A way to do this would be to only ignore VLRs with certain user ID's that matches data that PDAL knows how to construct properly at write-time.

I have tested this with the translate application:

pdal translate -i in.laz -o out.laz --writers.las.forward=vlr --writers.las.extra_dims=all

Running "pdal info --metadata" on in.laz explicitly tells me that the Riegl extrabytes exists. Doing the same for out.laz gives me (roughly) the same output but without the Riegl-VLR. The filesize of out.laz is also significantly smaller which leads me to conclude that the actual extrabytes have not been transferred to the output file.

This leads me to two questions:


1.       Would it make sense to allow some VLR+extrabytes with user ID "LASF_Spec" to pass through PDAL?

2.       Is there a way - that I have overlooked - to transfer the Riegl extrabytes data to new files created by a PDAL pipeline?

Thanks,

Kristian Evers

[0] http://www.riegl.com/uploads/tx_pxpriegldownloads/Whitepaper_-_LAS_extrabytes_implementation_in_Riegl_software_01.pdf
[1] http://www.pdal.io/stages/writers.las.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20161003/52a245cc/attachment.html>


More information about the pdal mailing list