[pdal] Clipping from multiple LAS tiles

Howard Butler howard at hobu.co
Tue Oct 25 05:55:58 PDT 2016


Adam,

IMO a tileindex is better for a number reasons:

1) You can use standard OGR query limitation operations (SQL, spatial SQL)
2) It can live in any OGR-writeable format
3) You can use coarse or fine boundaries
4) You can pass in filters in different coordinate systems and let OGR reproject them for you

Here's a potential workflow:

> pdal tindex index.sqlite "../merimbula2013/Tiles_2k_2k/\*.las"    -f "SQLite" --lyr_name "pdal" --t_srs "EPSG:4326" --fast_boundary

Then given something like the following pipeline:

> pdal pipeline merge-them.json


> {
>   "pipeline":[
>     {
>       "type":"readers.tindex",
>       "sql":"SELECT * from pdal",
>       "filename":"index.sqlite",
>       "where":"location LIKE \'%Merimbula2013-C3-AHD_7585912_55%\'",
>       "wkt":"POLYGON((759094.480855234 5913008.2715937095,758464.6999094139 5912716.199270982,757743.6463627518 5912898.7444 ........"
>     },
>     {
>       "type":"writers.las",
>       "filename":"outputfile.las"
>     }
>   ]
> }


A tile index allows you to treat it like any other reader, allows you to visualize tile sets using other GIS software like QGIS, and allows you to leverage GDAL/OGR for sophisticated query operations. Please try this workflow (which was stolen directly from how people do large tilesets in GDAL) and see if it doesn't fit within the PDAL gestalt a little better...

http://www.pdal.io/stages/readers.tindex.html
http://www.pdal.io/apps.html#tindex-command

Howard


> On Oct 24, 2016, at 11:56 PM, Adam Steer <Adam.Steer at anu.edu.au> wrote:
> 
> Hi PDAL Ninjas
> 
> I’m wondering how we can replicate LAStool’s multi-tile clipping fiunction, eg: lasclip -i folder/*.las -poly polygon.shp -o newfile.las
> 
> I’ve got a pretty clunky pipeline that works, based on the github pipeline examples:
> 
> {
>    "pipeline": [
>        { "filename": "Merimbula2013-C3-AHD_7585912_55_0002_0002.las",
>          "tag": "A"
>        },
> 	{ "filename": "Merimbula2013-C3-AHD_7585914_55_0002_0002.las",
>          "tag": "B"
>        },
> 	{ "filename": "Merimbula2013-C3-AHD_7605914_55_0002_0002.las",
>          "tag": "C"
>        },
> 	{
>            "inputs": ["A", "B", "C"],
>            "type": "filters.crop",
>            "polygon": "POLYGON((759094.480855234 5913008.2715937095,758464.6999094139 5912716.199270982,757743.6463627518 5912898.7444$
>            "outside": false
>        },
> 	"./merimbulatown.las"
>    ]
> }
> 
> 
> …but would prefer to not have to list all my tiles. The obvious:
> 
>    "pipeline": [
>         "../merimbula2013/Tiles_2k_2k/\*.las",
>        {
>            "type": "filters.crop”,
> 
> …didn’t work.
> 
> I’ve read the examples from the workshop/tutorial samples - and can’t put a finger on how to extend those either.
> 
> I see that tindex might be a way, but I’d like to do the job without constructing another file. Hmm. I feel like I’m missing something really obvious.
> 
> 
> Any suggestions will be appreciated!
> 
> Thanks
> 
> Adam
> _______________________________________________
> pdal mailing list
> pdal at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pdal



More information about the pdal mailing list