[pdal] Reading only specific fields from LAS files to improve performance.

Andrew Bell andrew.bell.ia at gmail.com
Mon Mar 15 16:03:50 PDT 2021


I should add that if all you want is XYZ from a LAS (rather than LAZ), you
really don't need PDAL at all, as the code is trivial. I'd need to know
more about your use case to make better suggestions.

On Mon, Mar 15, 2021 at 7:00 PM Andrew Bell <andrew.bell.ia at gmail.com>
wrote:

> Hi,
>
> You should look at
>
> this:
> https://github.com/PDAL/PDAL/pull/3311/commits/db2d4a2539ad4551b62fee9711c51f0e0cbb939b
>
> This change allows a user to limit what gets loaded when using `pdal
> translate` or `pdal pipeline`, but the code that's there can serve as an
> example for your own.
>
> Note that this doesn't change what gets read from a file, just what gets
> stored. We don't currently support the selective reading of data, though
> this probably only much matters for LAZ with point formats 6-10.
>
> On Mon, Mar 15, 2021 at 6:32 PM Leona Swift <leonaswift80 at gmail.com>
> wrote:
>
>> When using PDAL as part of a C++ codebase to read a large LAS/LAZ file
>> from which we are only interested in the XYZ position of each point, import
>> with PDAL is very slow. It looks like all of the other attributes in the
>> PDAL file are being parsed. Additionally that parsing is very slow due to
>> many type conversions, although the documentation is clear that PDAL is
>> more concerned with genericity than efficiency.
>>
>> Is there any example in C++ of how to say "Only read the XYZ data from
>> this file" to make things quicker?
>>
>> I assume that it is possible to do something (prepare the table
>> differently) prior to calling execute() (which is where the time is spent.)
>> However, there don't seem to be any code examples of doing this.
>>
>> las_reader.setOptions(las_opts);
>> las_reader.prepare(table);
>> pdal::PointViewSet point_view_set = las_reader.execute(table);
>>
>> (Actually, I haven't found any C++ examples at all other than
>> https://pdal.io/api/transition/index.html).
>> _______________________________________________
>> pdal mailing list
>> pdal at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/pdal
>>
>
>
> --
> Andrew Bell
> andrew.bell.ia at gmail.com
>


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


More information about the pdal mailing list