docker run -it --rm -v $(pwd):/data pdal/pdal pdal pipeline /path/to/json/file/simple_crop.json
{
"pipeline":[
"path/to/original/las/file/lidar.las",
{
"type":"filters.crop",
"point": "Point (1136725.47257809434086084 1987231.01693190541118383)",
"distance":"50"
},
{
"type":"writers.las",
"filename":"/path/to/cropped/las/file/cropped_lidar.las"
}
]
}
{
"pipeline":[
"/path/to/lidar.las",
{
"type":"filters.reprojection",
"in_srs":"EPSG:6455",
"out_srs":"EPSG:4326+6360"
},
{
"type":"writers.text",
"filename":"path/to/new/reprojected_lidar.csv"
}
]
}
{
"pipeline": [
{
"filename": "/data/las/10509775.las",
"tag": "tag_10509775"
},
{
"filename": "/data/las/10259775.las",
"tag": "tag_10259775"
},
{
"filename": "/data/las/10259750.las",
"tag": "tag_10259750"
},
{
"filename": "/data/las/10509750.las",
"tag": "tag_10509750"
},
{
"type": "filters.crop",
"point": "POINT(1104970.32399 1977682.27218)",
"distance":"492",
"inputs":[
"tag_10509775",
"tag_10259775",
"tag_10259750",
"tag_10509750"
],
"tag": "clipped_o"
},
{
"type": "writers.las",
"filename": "/data/las/cropped/clip_o.las"
}
]
}
{
"pipeline": [
{
"filename": "/data/las/10509775.las",
"tag": "tag_10509775"
},
{
"filename": "/data/las/10259775.las",
"tag": "tag_10259775"
},
{
"filename": "/data/las/10259750.las",
"tag": "tag_10259750"
},
{
"type": "filters.crop",
"point": "POINT(1091931.78695 1831913.54880)",
"distance":"492",
"inputs":[
"tag_105097750"
],
"tag": "clipped_a"
},
{
"type": "filters.crop",
"point": "POINT(1108768.71304 1829578.57199)",
"distance":"492",
"inputs":[
"tag_10259775",
"tag_105097750"
],
"tag": "clipped_b"
},
{
"type": "filters.crop",
"point": "POINT(1136723.82376 1987234.21768)",
"distance":"492",
"inputs":[
"tag_105097750",
"tag_10259750"
],
"tag": "clipped_c"
},
{
"type": "filters.merge",
"inputs": [
"clipped_a",
"clipped_b",
"clipped_c"
],
"tag": "merged"
},
{
"type": "writers.las",
"filename": "/data/las/cropped/merge-clipped.las"
}
]
}
{
"pipeline":[
"input.las",
{
"type":"filters.assign",
"assignment":"Classification[:]=0"
},
{
"type":"filters.smrf"
},
{
"type":"filters.hag"
},
{
"type":"filters.ferry",
"dimensions":"HeightAboveGround=Z"
},
"output.las"
]
}
Run with
docker run -it --rm -v $(pwd):/data pdal/pdal pdal pipeline --readers.las.filename=/data/las/cropped/mylasfile.las --writers.las.filename=/data/las/cropped/newlasfile.las /data/generic_pipeline.json
or in a loop
for file in las/cropped/*.las
do
BASE=`basename $file .las`
OLDFILE=${BASE}.las
NEWFILE=${BASE}_hag.las
docker run -it --rm -v $(pwd):/data pdal/pdal pdal pipeline --readers.las.filename=/data/las/cropped/$OLDFILE --writers.las.filename=/data/las/cropped/$NEWFILE /data/generic_pipeline.json
done