Using withheld points in lasground_new

93 views
Skip to first unread message

Mauro Marty

unread,
Dec 7, 2017, 4:11:46 AM12/7/17
to LAStools - efficient tools for LiDAR processing
Hi,

does someone know if it is possible to use the points which are flagged as withheld in ground classification?
I`ve tiled a big laz with buffers for which I flagged the buffered points as withheld. If I now run lasground_new on theses tiles the algorithm is only applied on the points which are not flagged as withheld, so I`m missing the whole buffered area.

Thanks,

Mauro

Steeve Brissette

unread,
Dec 7, 2017, 4:24:40 AM12/7/17
to last...@googlegroups.com
Why would you buffer a big LAZ. If it’s an area, than you can use your project area to clip the buffer with lasclip:
lasclip -i big.laz -poly boundingboxbeforebufder.(shp,txt) -olaz

Steeve Brissette 
Civil/Geomatics Technician 
TDB Consultants Inc.

Steeve Brissette

unread,
Dec 7, 2017, 1:06:28 PM12/7/17
to last...@googlegroups.com
Sorry for the double reply.. I just want to say... I buffered a tile-flag_as_withheld, than I tiled it with buffer. I than ran lasground_new on my new buffered tiles, than all worked like it supposed?!

lastile -i reallybig.laz -tile_size “big” -buffer 50 -olaz
lastile -i big.las -tile_size “smaller” -buffer 25 (I didn’t flag_as_withheld) -olaz
lasground_new -i smaller.laz -town -olaz -odix _grd
lastile -i smaller_grd.laz -remove_buffer -olaz -odix _debuff

That was just a quick an dirty way to test that out.

With Buffer:
image1.png

Without buffer:

image2.png

Maybe it’s because I don’t use twice the -flag_as_withheld.. 


Steeve Brissette 
Civil/Geomatics Technician 
TDB Consultants Inc.


On Dec 7, 2017, at 12:50 AM, Mauro Marty <mauro...@gmail.com> wrote:

--

Mauro Marty

unread,
Dec 7, 2017, 1:06:36 PM12/7/17
to LAStools - efficient tools for LiDAR processing
Thanks Steeve,

maybe I formulated the question poorly.
I have one hudge laz file. If I want to do for instance a ground classification on this file I have to tile it first, because I cannot classify ground points in a laz file with 10 Billion points. To get a proper ground classification also on the borders of the tiles I have to buffer these tiles. During the tiling process I flaged the buffered points as withheld to be flexible on removing the buffer if I want to get an custom area from within my tiles.
Lasground_new does a proper classification for all the point of a tile (also with buffers) if the buffered points are not flaged as withheld. If they are flaged as withheld ground classification is only applied to the not buffered points within the tile, that`s what I don`t want because then I get artefacts in the ground classification on tile borders.

Mauro

Mauro Marty

unread,
Dec 8, 2017, 1:53:22 AM12/8/17
to LAStools - efficient tools for LiDAR processing
Hello Steve,

thanks for the reply. Yes this works. I suppose I just have to tile the data without -flag_as_withheld, then do the ground classification and then remove the buffer from the classified tiles.

Would you know how I could do the following:

1. lastile -i reallyBigLaz.laz -odir tiles -tile_size "small" -odix _small -buffer 10 -olaz
2. lasground_new -i tiles\*.laz -odir ground -olaz -odix _grd

--> now I have ground classified smaller tiles, the problem which brought me to the withheld flas is, that I want to clip a part out of the classified laz tiles and this part could intersect with many classified tiles.
I do it normally (and this works for tiles without buffer) with: las2las -i ground\*.laz -o myPart.laz -merged -keep_xy x_min y_min x_max y_max (it also works for tiles with buffers, if the buffered points are flagged as withheld with the use of the -drop_withheld tag, but as mentioned before the withheld points are not considered in the ground classification and I therefore keep having the problem with border artefacts)

--> But if I have buffers on the tiles which are not flagged as withheld I still have to somehow remove them, otherwise I have all the buffer points in myPart.laz
I know I could do this if I run lastile on the ground classified tiles with -remove_buffer first and then do the las2las extraction with -keep_xy, but this way I have to unbuffer all the tiles first. With very many points this seems like a hudge overhead.
Is there a way to remove the buffers directly (also if thes are not flagged as withheld)?


Mauro

Martin Isenburg

unread,
Dec 8, 2017, 5:02:37 PM12/8/17
to LAStools - efficient command line tools for LIDAR processing
Hello Mauro,

that is incorrect. All LAStools (such as lasground, lasground_new, lasnoise, lasduplicate, ... ) will also operate on all the points flagged as 'withheld' unless they are explicitly instructed to drop those points (aka '-drop_withheld). The reason to add the '-flag_as_withheld' option during the initial tiling step with lastile is so these buffer points can later easily be dropped when merging multiple tiles into one without needing an explicit step to '-remove_buffer' with lastile thereby avoiding yet another copy of the data. Typical operations for merging buffered tiles and then using the -drop_withheld' option to remove the buffer points on-the-fly from buffered tiles are:

lasboundary -i tiles_classified_and_buffered/*.laz ^
                     -merged -drop_withheld ^
                     -keep_class 6 ^
                     -disjoint -concavity 1.5 ^
                     -o buildings.shp

lasgrid -i tiles_classified_and_buffered/*.laz ^
           -merged -drop_withheld ^
           -classification -false -step 1 ^
           -o classification_coloring.png

lascanopy -i tiles_classified_and_buffered/*.laz ^
                 -merged -drop_withheld ^
                 -lop field_plots.shp ^
                 -cov -p 25 50 75 -b 30 80 -kur ^
                 -o metrics.csv

Also see this blog post on buffering:


Regards,

Martin @rapidlasso

--

Mauro Marty

unread,
Dec 11, 2017, 9:41:48 AM12/11/17
to LAStools - efficient tools for LiDAR processing
Hello Martin,

thanks for the answer! Sorry for the confusion. That`s true, everything works as supposed. The problem was, that in the lasviewer used, the withheld flag overrules the classification.
If I do a simple las2las with keep_class 2, I can see the ground classified points in the buffer area.

Mauro
Reply all
Reply to author
Forward
0 new messages