[pdal] loop a directory through a pipeline

Howard Butler howard at hobu.co
Thu Apr 28 08:26:19 PDT 2016


> On Apr 28, 2016, at 10:04 AM, Maxson, Michele L ERDC-RDE-CRREL-NH CIV <Michele.L.Maxson at erdc.dren.mil> wrote:
> 
> Example 3 (pipeline that works properly on a single file):
> {
>    "pipeline": [
>        "/data/CRREL/split/CRREL_Split_1.laz",
>        {
>            "type": "filters.statisticaloutlier",
>            "extract":"true",
>            "multiplier":5,
>            "mean_k": 4
>        },
>        {
>            "type": "filters.range",
>            "limits": "Z[115:150]"
>        },
>        {
>            "type": "writers.las",
>            "compression": "true",
>            "minor_version": "2",
>            "dataformat_id": "0",
>            "filename":"/data/CRREL/split/Denoise/CRREL_Split_1_Clean.laz"
>        }
>    ]
> }

This is the one you need to use, it has slots for both the reader and writer file. A pipeline without a reader isn't valid, and one without a writer can't write.

You can test this by running manually:

> pdal pipeline -i /path/to/pipeline.json --readers.las.filename=/data/CRREL/split/CRREL_Split_2.laz --writers.las.filename=/data/CRREL/split/Denoise/CRREL_Split_2_Clean.laz

> pdal pipeline -i /path/to/pipeline.json --readers.las.filename=/data/CRREL/split/CRREL_Split_3.laz --writers.las.filename=/data/CRREL/split/Denoise/CRREL_Split_3_Clean.laz

PDAL allows you to substitute or override options via the command line, but they need to exist in the pipeline first. 


More information about the pdal mailing list