I'm not exactly sure what your goal is. If you're trying to write some kind of a UI that builds a pipeline based on some options (or some such), then what you're doing is pretty much it. You might want to look at the source code for some of the kernels. The info kernel is a bit of a mess, but does this kind of thing. You might also have a look at PipelineManager, which is what we use internally to build pipelines from a specification.
That said, no matter what you're doing, the general procedure is to build a pipeline, then prepare and execute it.
Hope that helps,
On Wed, May 16, 2018 at 9:06 AM, Odd Ragnar Lydersen <[hidden email]> wrote:
I’m writing code to add filters when reading las files.
All examples are in json format, and I’m wondering what is the best way to do this in C++.
I’ve been looking at the tests from the source code, to get examples, but I can’t find any that combine different kinds of filters.
Code example (Semi Pseudo):
// Only rangeFilter is used
else// Both filters are used
else// Only cropFilter is used
else // No filters are used
Is there a better, and more elegant way to do this?
On 5/23/18 3:06 AM, Odd Ragnar Lydersen wrote:
> I’ll try to use the PipelineManager and see how it goes.
Both the Python and Java extensions exclusively use the PipelineManager
rather than directly interacting with Stages. It is much easier to
manipulate PDAL pipeline in JSON than directly touching the objects.
Additionally, we are unlikely to break the Pipeline JSON syntax going
forward, but the C++ API might change a little bit which would cause you
If you workflow is to simply get at data and drive PDAL's stages, using
pipelines as JSON with PipelineManager is going to be the easiest and
most convenient way to program things.