[pdal] --drivers and --options now available

Howard Butler hobu.inc at gmail.com
Wed Jul 3 07:55:44 PDT 2013


On Jul 2, 2013, at 10:38 PM, Chris Foster <chris.foster at roames.com.au> wrote:

> On 3 July 2013 05:15, Howard Butler <hobu.inc at gmail.com> wrote:
>> I have implemented the frequently requested support for listing the
>> --options and --drivers that are available for the PDAL command line
>> utilities.
> 
> Very nice, I was going to ask if there was a way of doing this :)
> 
> So does this mean I have a bug in the change I made to Mosaic the other day: I
> used getOptions().getValueOrDefault<bool>("ignore_srs", false), but I didn't
> add "ignore_srs" to the getDefaultOptions() function?

There's a hard balance to strike. I don't want people to have to instantiate an entire pipeline with the stages arranged how they want just to get help information back on what options they should need to use, or what dimensions a stage might add to the pipeline. This is because most stages require linkage to other stages, and it's a giant hassle.

To that end, we have a set of defined static methods that return a pdal::Options or a vector of pdal::Dimension. This update simply uses them instead of the previous behavior where they were mostly ignored. Hopefully this is incentive for us to keep things up to date.

> 
> I don't suppose there's a way we could enforce this kind of metadata
> consistency between the reported options and the options which are actually
> used?

I can't think of any. As stated above, I don't want to force construction of the stage simply to fetch help info.

> 
> Just thinking aloud here - One way to do it would be to avoid storing Options
> in Stage as a matter of course and remove Stage::getOptions().  This would
> encourage each stage to cache the relevant options in member variables.  There
> would need to be a standard way to do this which builds the list default
> options automatically.

I don't want to do that because there could be situations where one stage might be listening to another stages options (why, I don't know, but maybe it is a possibility).



More information about the pdal mailing list