[pdal] PDAL Pipeline Extensibility

Howard Butler howard at hobu.co
Fri Dec 30 13:42:53 PST 2016


After thinking about it a bit, my plan is to put everything in the kwargs dict of the function and simply call the function with it. This would allow you to set things like the stage metadata via this mechanism as well.

Please make a PR where you think the docs are deficient about GDAL + Proj.4. I'll happily merge stuff in that makes navigating that fog bank any easier.

Howard



> On Dec 30, 2016, at 3:39 PM, Kristian Evers <kreve at sdfe.dk> wrote:
> 
> Also a good idea to extend it to include schema, metadata etc. Hadn't even crossed my mind! What about just calling the dictionary globals? The way you intend to implement it, it is more than just the pipeline and pipeline['pipeline'] is repeating itself.
> 
> About the SRS definition, that's what I eventually figured out because I knew that GDAL and Proj.4 is powering coordinate transformation. Maybe this should be added to the docs as well? Ideally with a link to a relevant section of GDAL documentation.
> 
> /Kristian 
> 
>> -----Oprindelig meddelelse-----
>> Fra: pdal [mailto:pdal-bounces at lists.osgeo.org] På vegne af Howard Butler
>> Sendt: 30. december 2016 16:53
>> Til: Kristian Evers
>> Cc: pdal at lists.osgeo.org
>> Emne: Re: [pdal] PDAL Pipeline Extensibility
>> 
>> 
>>> On Dec 29, 2016, at 3:16 PM, Kristian Evers <kreve at sdfe.dk> wrote:
>>> 
>>> Recently I have had a need for feeding user data to the programmable
>> filter. I have an application that creates a PDAL pipeline based on the input
>> and various settings determine the output. In some cases I use the
>> programmable filter to do something that is outside the current scope of
>> PDAL. If it were possible to access the pipeline JSON, and the userData
>> section of the pipeline, from the Python function behind the filter I would be
>> able to make more generic filters.
>> 
>> This is a good idea.
>> 
>> I'll make a dict of globals called 'pipeline' available to both
>> filters.programmable and filters.predicate that represent the following:
>> 
>> pipeline['schema'] -> json dict
>> pipeline['metadata'] -> json dict
>> pipeline['pipeline'] -> json dict
>> pipelien['log'] -> writeable log stream
>> 
>> 
>>> A recent example is that I wanted to create a vertical gridshift filter (similar
>> to what Proj.4 does). I would have liked to pass the grid name to the
>> programmable filter as a PDAL pipeline parameter but that is not possible.
>> Instead I ended up hard coding it. It did the job but wasn't a very satisfying
>> solution. I have since realized that I can in fact use the reprojection filter to
>> do this (via Proj.4). This is just the example that came to mind – I have been
>> in similar situations before but the exact details escape my memory.
>> 
>> Thanks for your documentation update that demonstrates how to do
>> gridshifts and proj.4 strings in PDAL
>> http://www.pdal.io/stages/filters.reprojection.html#examle-2 . I guess I
>> assumed people familiar with GDAL's SRS handling tools would just know that
>> the same skills and techniques would transfer.
>> 
>> Howard
>> _______________________________________________
>> pdal mailing list
>> pdal at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pdal



More information about the pdal mailing list