[pdal] looping multiple bounding coordinates in PDAL

Jed Frechette jedfrechette at gmail.com
Tue Dec 10 10:54:18 PST 2019


On Tue, 10 Dec 2019 13:10:33 -0500 Nicolas Cadieux
<nicolas.cadieux at archeotec.ca> wrote
>  4. Runs this command in a loop (the loop is created by using "map" or
>     "p.map" function that operates on the list of tif files)

To easily make this multithreaded you can use the multiprocessing
library. I've got a ton of code running similar types of command line
tasks in parallel that all boil down to something like the following.
In production, I tend to also keep a single threaded code path that
will run the function in a loop for debugging purposes.

from multiprocessing import Pool

def do_task():
    """Perform what ever standalone task you want to do here."""
    pass

pool = Pool()
results = pool.apply_async(do_task)
pool.close()
pool.join()


-- 
Jed Frechette


More information about the pdal mailing list