[pdal] writing points in PDAL

Scott Crawford scrawford at gno-sys.com
Thu Dec 2 15:15:56 PST 2021


Hi,
A number of questions, I'll try to keep them clear.  Currently I have c++ software using Liblas that generates points, then writes the points to a las file.  Since Liblas is old and no longer supported (and because we are considering Las 1.4 format), we are trying to migrate to PDAL.  However, it seems there is minimal documentation regarding writing code with PDAL, it seems focused on using precompiled tools on json pipelines, and the Liblas to Pdal transition guide doesn't discuss output.  The C++ API pages for classes such as PointTable or PointView are blank.
I felt our application is most similar to the example at https://pdal.io/development/writing.html.  I have mimicked this to create a table and a view, and instead of writing points immediately to a file, I add points to the table and then after completing all points I create the writer and execute it.
First question, the example has the comment "Set second argument to 'true' to let factory take ownership of stage and facilitate clean up."  But the command that follows doesn't allow a second argument, is this just an error in the example or leftover from an old version of pdal, or did I miss something?
Second question, the example uses a StageFactory to create a "writers.las" stage.  I've also found that I could just use a LasWriter instead.  Any reason to prefer one style over the other?
Last question (for now), Previously in Liblas when writing points individually as they were created, I could make a decent progress bar which would reach 100% when the creation of the las file was complete.  Now I can still have a progress bar for populating the PointTable, but then the writer execute step takes a long time so it sits at 100% for a couple minutes before continuing.  Is there any way to stream the writing?  Or is that only possible when working with a pipeline?  I've seen classes like FixedPointTable used elsewhere, but there's no documentation on this class or how to make use of it.  And I see the BufferReader used to read the Point Table is not streamable, but it is the only option or are there other ways to pull from the point table in a streaming fashion?
Thanks for your help,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20211202/63ab7f64/attachment.html>


More information about the pdal mailing list