[pdal] Building a PDAL pipeline in python

Adam Steer Adam.Steer at anu.edu.au
Thu Mar 2 14:59:37 PST 2017


Hi Peter, Howard

Peter - I’m really interested in your use case, since I will eventually need to do similar things - parallelize PDAL operations and do very similar tasks.

I’ve seen a case of gnu parallels in use for PDAL (https://smathermather.com/category/parallel/), I’m not sure if this approach will help out.

I’ve also just been tinkering with a python pipeline to grab subset of points using a polygon and write out a geotiff, but this isn’t really working. I’ve considered doing some kind of intersection of the subset polygon with a tile index to create a set of PDAL tasks to execute in parallel, then join the results.

Hopefully not distracting you, just expressing interest in this topic (parallel operations, python pipelines and PDAL)

Adam




> On 3 Mar 2017, at 8:34 am, Peter Tittmann <ptittmann at gmail.com> wrote:
> 
> Howard,
> 
> I’m writing the pipeline in python as I’m going to use the multiprocessing module to parallelize pdal pipelines. I’m in the early stages of testing this. I’d like to be able to avoid using Fusion to derive gridded point cloud metrics and also be able to work directly on the points using PCL.
> 
> Right now however, its not really working:
> 
>> In [5]: import pdal
>> 
>> In [6]: pString = unicode(makePlots(1112))
>> 
>> In [7]: pString
>> Out[7]:
>> u'{"pipeline": ["./pgc_input/chug_lidar/Kenai/Points/Ken_00403.las", {"distance": 46.330202145018255, "type": "filters.crop", "point": "POINT(671977.149785037 6621359.13979493)"}, "./pgc_input/plot_las/plot1112.las"]}'
>> 
>> In [8]: pipe = pdal.Pipeline(pString)
>> 
>> In [9]: pipe.validate()
>> Warning 1: Cannot find pcs.csv
>> Out[9]:
>> True
>> 
>> In [10]: pipe.loglevel = 9
>> 
>> In [11]: count =pipe.execute()
>> 
>> Process Python killed
>> 
> 
> Thanks for your interest and for PDAL..
> 
> Peter
> 
>   
>> On Mar 2, 2017, at 10:41 AM, Howard Butler <howard at hobu.co> wrote:
>> 
>> Peter,
>> 
>> I'm curious how you're using the Python bindings, whether or not they fit your workflow, and whether the approach is viable for you to make it easy to use PDAL with your existing workflows.
>> 
>> I had one thing I wanted to do with it, and I thought it might be useful for others. How does it work for you?
>> 
>> Howard
>> 
>>> On Mar 2, 2017, at 11:48 AM, Andrew Bell <andrew.bell.ia at gmail.com> wrote:
>>> 
>>> On Thu, Mar 2, 2017 at 11:24 AM, Peter Tittmann <ptittmann at gmail.com> wrote:
>>> Hi,
>>> 
>>> Using: pdal 1.4.0 (git-version: Release)
>>> 
>>> I’m developing a pipeline in python which produces the following JSON:
>>> 
>>> > pipeString ='{"pipeline": ["./pgc_input/chug_lidar/Kenai/Points/Ken_00403.las", {"radius": 46.330202145018255, "type": "filters.crop", "point": "POINT(671977.\
>>> > 149785037 6621359.13979493)"}]}’
>>> 
>>> 
>>> PDAL doesn’t seem to understand radius using `filters.crop`:
>>> 
>>> Somehow the docs got out of sync with the code.  Not sure how this happened but I will fix.  The correct name of the option is "distance" rather than "radius".  You can use "pdal --options filters.crop" at the command line to get an up-to-date list of the options for the crop filter.
>>> 
>>> Hope that helps.
>>> 
>>> -- 
>>> Andrew Bell
>>> andrew.bell.ia at gmail.com
>>> _______________________________________________
>>> pdal mailing list
>>> pdal at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/pdal
>> 
> 
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pdal



More information about the pdal mailing list