[pdal] Run a filter (sort) for a list of LAS files in a directory

Howard Butler howard at hobu.co
Wed Jul 31 11:28:16 PDT 2019


https://pdal.io/workshop/exercises/batch_processing/batch-processing.html <https://pdal.io/workshop/exercises/batch_processing/batch-processing.html> demonstrates some windows-based batch processing.

I would suggest using the 'pdal' command line utility along with filters.sort https://pdal.io/stages/filters.sort.html <https://pdal.io/stages/filters.sort.html> for operations and then using subprocess or python coroutines if you want to get fancy to drive it. If you don't need to access the points from numpy or geopandas directly, there is no reason to take on the burden of being in Python land for the point cloud operations.

Howard

> On Jul 31, 2019, at 11:53 AM, Joseph S Faraguna <faraguna at mit.edu> wrote:
> 
> Miguel,
> 
> You can embed a pdal pipeline in a Python program and execute the pipeline on a directory of files.
> 
> The code below will sort each las file in the directory in which the Python program is placed by its X dimension, overwrite the files with the sorted output, and also print out a pandas DataFrame of each sorted output.
> 
> Best,
> 
> Joe
> 
> 
> 
> On Wed, Jul 31, 2019 at 11:52 AM Andrew Bell <andrew.bell.ia at gmail.com <mailto:andrew.bell.ia at gmail.com>> wrote:
> 
> This question is very general.  Perhaps you should write a program to the point where you have a specific problem where someone might help you.
> 
> On Wed, Jul 31, 2019 at 1:58 AM Miguel Guerrero <g.miguel.guerrero.m at gmail.com <mailto:g.miguel.guerrero.m at gmail.com>> wrote:
> Hello,
> 
> I hope you are doing well.
> 
> It has been hard for me to find a good example that shows me how to run a PDAL filter in batch mode (looping) using Python.
> 
> I have a set of LAS files in a directory and I want to be able to sort the points for each file by GPS time using a looping method in Python 2.7
> 
> Could anyone in the list help please?
> 
>  
> 
> Thanks in advance for your response.
> 
>  
> 
> Regards,
> 
>  
> 
> Miguel
> 
>  
> 
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
> 
>  
> 
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org <mailto:pdal at lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/pdal <https://lists.osgeo.org/mailman/listinfo/pdal>
> 
> -- 
> Andrew Bell
> andrew.bell.ia at gmail.com <mailto:andrew.bell.ia at gmail.com>_______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org <mailto:pdal at lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/pdal <https://lists.osgeo.org/mailman/listinfo/pdal>
> 
> -- 
> Department of Biological Engineering | Class of 2020
> 
> Massachusetts Institute of Technology
> 
> faraguna at mit.edu <mailto:faraguna at mit.edu>| (281) 902-6908 <tel:(281)%20902-6908><filter.py>_______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pdal

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20190731/e56c7654/attachment.html>


More information about the pdal mailing list