[pdal] writing points in PDAL

Andrew Bell andrew.bell.ia at gmail.com
Thu Dec 2 15:43:22 PST 2021


On Thu, Dec 2, 2021 at 6:16 PM Scott Crawford <scrawford at gno-sys.com> wrote:

> Hi,
>
> A
>
> 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?
>

Not sure what you're looking at. You're welcome to submit a PR if things
are wrong.

A StageFactory owns the stages created with it. Normally you just keep the
factory around until the end and it will take the stage with it when it is
destroyed.


> 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?
>

Either way is fine. If you use the StageFactory to create a stage by name,
you don't need the header file for the stage. This can be useful in some
cases.


> Is there any way to stream the writing?
>

Some stages support streaming and this is noted in the documentation for
each stage.  You can control how many points are processed at once when
using streaming by setting the size of the FixedPointTable (or similar).
There are many examples in the tests and the code itself.

  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?
>

The BufferReader is only useful for non-streaming (standard) mode. Without
knowing more about exactly what you're trying to do, it's hard to provide
any recommendations.

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


More information about the pdal mailing list