[pdal] Reading only specific fields from LAS files to improve performance.
Leona Swift
leonaswift80 at gmail.com
Mon Mar 15 15:32:37 PDT 2021
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).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20210315/6955ca31/attachment.html>
More information about the pdal
mailing list