[pdal] How to get las header info?

Andrew Bell andrew.bell.ia at gmail.com
Wed Mar 23 04:34:23 PDT 2022


On Wed, Mar 23, 2022 at 5:14 AM Peder Axensten <Peder.Axensten at slu.se>
wrote:

> Dear list,
>
> Previously, I could obtain a pdal::LasHeader through:
>
> inline pdal::LasHeader get_header( const std::filesystem::path & path_ ) {
> pdal::LasHeaderheader;
> pdal::ILeStreaminput{ path_.native() };
> input >> header;
> return header;
> }
>
> But in the latest version of pdal the header copy constructor is
> implicitly deleted.
>

This issue has already been reported and fixed and will be included in the
final 2.4 release:

 https://github.com/PDAL/PDAL/pull/3713

The tool needs to process all las-files of a specified directory (and its
> sud-directories). If I need to read the contents of files that could
> actually be ignored, it would increase processing time probably tenfolds.
> Is there a way to avoid this?

    Maybe a previous stage in the pipeline to filter files based only on
> their header (bounding box) info?
>     If I implement it as a streaming operation, could I get the bounding
> box from header info and possibly not stream anything?
>

The bounding box of a LAS file is always stored at offsets 179-226, so you
can read them directly if you like, but as I said above, I have re-enabled
copying of LasHeader.

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20220323/de88ac9a/attachment.html>


More information about the pdal mailing list