lascanopy more efficient

111 views
Skip to first unread message

Susana Gonzalez

unread,
Oct 10, 2014, 5:56:31 PM10/10/14
to last...@googlegroups.com

Hi,

I am writing a batch file to run lascanopy, do you have any suggestion about what will be more efficient of these three options for a large dataset

-keep_class 2 3 4 5

-drop_class 1 6 7 9 12 14

Or when I run lasmerge use only the four desired classes (I need to run lasmerge any way because the tiles for class 2 are in another folder)

Thanks

 

Susana Gonzalez

Forest Engineer, LiDAR Science

 

Nick Vaughn

unread,
Oct 10, 2014, 6:35:22 PM10/10/14
to last...@googlegroups.com
Hi Susana,
I haven't looked at the code in this part of LASLib, so I may be way off here, but it seems like either condition (-keep vs -drop) would have to be implemented with if statements in a loop. Thus, fewer conditions would be better, which means -keep_class 2 3 4 5 would be faster (though only slightly)

I think more importantly, though, if there happens to be classifications other than 1 6 7 9 12 or 14 in the input, using -drop_class 1 6 7 9 12 14 would not eliminate these points and they would subsequently be included in the canopy metrics.

I don't know if this is how you have it set up, but you might look at using something like the following to avoid the extra call to lasmerge:

lascanopy.exe -i otherclasses\*.laz class2\*.laz -merged ... (if "otherclasses" and "class2" are folders with tiles that you want included)

If you weren't putting this into a batch I would say definitely do the lasmerge first, since if you make an error in you lascanopy command line, you would not have to read through ALL the points again.  In a batch file, though, the extra lasmerge step will just mean that all points with classes 2 3 4 or 5 would have to be needlessly written to disk (slow) and read a second time.


Good luck,
-Nick




Susana Gonzalez

unread,
Oct 11, 2014, 4:01:05 AM10/11/14
to last...@googlegroups.com

Hi Nick,

Thank you to point about the conditions, this will be helpful to do another decisions.

 

I thought about doing the -merged setting as well so after your comment, I will integrate it when I run lasheight to normalise the data before to run lascanopy

 

I just tried

lasheight.exe -i otherclasses\*.laz class2\*.laz -merged -replace_z -keep_class 2 3 4 5

It's working good, I will go through this way so I don't need to do lasmerge.

 

Thank you so much

 

Susana

Martin Isenburg

unread,
Oct 14, 2014, 4:56:16 AM10/14/14
to LAStools - efficient command line tools for LIDAR processing

Hello,

Currently the -drop_class and the -keep_class filters only support point classes 0 through 31. They are both implemented using a bit-mask so that the performance of either is identical.

Instead of merging all tiles into one file (which will fail when you merge too many hundred square kilometer) it may be more efficient to operate in a tile-based manner.

lastile -i strips/*.laz ^
            -tile_size 2000 -buffer 20 ^
            -odir tiles_raw -o mordor.laz

lasground -i tiles_raw/*.laz ^
                    -fine ^
                    -replace_z ^
                    -odir tiles_ground -olaz ^
                    -cores 8

lascanopy -i tiles_ground/*.laz ^
                    -step 10 ^
                    -kur -avg -cov -p 50 95 ^
                    -use_tile_bb ^
                    -odir tiles_grids -obil ^
                    -cores 8

If needed you can merge all of the BIL rasters with GDAL or lasgrid into one large raster as a final step. We will go over such multi-core processing pipelines in the forestry LAStools workshops at ACRS 2014 (Myanmar), ForestSAT (Italy) and ForestTECH (Rotorua/Melbourne). More details on all upcoming events are here: http://rapidlasso.com/events

For even more efficiency because less I/O ... try the new LASlayers prototype that will be "officially" introduced at my ELMF 2014 talk on Dec 10 in Amsterdam.

Regards,

Martin @rapidlasso

--
http://rapidlasso.com - fast tools to metric your LiDARs

Reply all
Reply to author
Forward
0 new messages