Calculating canopy cover and gap

304 views
Skip to first unread message

Shukhrat

unread,
Jun 25, 2019, 1:40:29 AM6/25/19
to LAStools - efficient tools for LiDAR processing
Hello,

I have two following problems with using lascanopy.
1) I want to calculate a canopy cover and gap with following pipeline: 

lascanopy -i 9A-1.las -gap -cov -files_are_plots -o 9A-1_covgap.csv

It is calculating only canopy cover: 

file_number    cov_gap
1 37.3
Am I missing something?

2) I would like to calculate canopy cover at different heights (5, 10, 15 meters). Is there a pipeline I can use? I know I can calculate it by changing heigh_cutoff for each height but I was wondering if there is a way of doing this with one line of script.

Any help highly appreciated.

Cheers,
Shukhrat



Shukhrat

unread,
Jun 27, 2019, 1:03:05 AM6/27/19
to LAStools - efficient tools for LiDAR processing
I attached lasinfo file if it helps.
Thanks
infolas.txt

Martin Isenburg

unread,
Jun 27, 2019, 2:34:14 AM6/27/19
to LAStools - efficient command line tools for LIDAR processing
Hello Shukrat,

always good to add a lasinfo report ... (-:

I noticed that your GPS times are a bit odd as both the earliest and the latest point have a GPS time stamp without milliseconds or microsecond but round numbers such as 2.0 and 21179417.0. It seems something else is stored in this field? What scanner did the recording? Also the scale of quarter of a millimeters seems excessive for a forest scan and the offsets in the LAS header are not pretty. You can fix scale and offset with:

las2las -i in.laz -rescale 0.001 0.001 0.001 -auto_reoffset -o out.laz

There is no separate '-gap' metric. The addition of '-gap' simply inverts the meaning of '-cov' and '-dns' to be 100% (or 1.0) minus the canopy cover or canopy density percentage (or '-fraction').

Regards,

Martin @rapidlasso


--
Download LAStools at
http://lastools.org
http://rapidlasso.com
Be social with LAStools at
http://facebook.com/LAStools
http://twitter.com/LAStools
http://linkedin.com/groups/LAStools-4408378
Manage your settings at
http://groups.google.com/group/lastools/subscribe
---
You received this message because you are subscribed to the Google Groups "LAStools - efficient tools for LiDAR processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lastools+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lastools/46fc167d-a89f-495a-86e4-fac35d261cb9%40googlegroups.com.

Shukhrat

unread,
Jun 27, 2019, 3:14:08 AM6/27/19
to LAStools - efficient tools for LiDAR processing
Thank you very much for your valuable comments Martin, and very sorry for giving incomplete information about my data.
Data was collected with Topcon GLS2000 TLS which has no GPS mounted. I collected coordinates of Scan stations with DGPS and georeferenced with CloudCompare. Therefore I have incorrect GPS times. I will fix scale and offset according to your comment. What about my second question:

2) I would like to calculate canopy cover at different heights (5, 10, 15 meters). Is there a pipeline I can use? I know I can calculate each canopy cover by changing heigh_cutoff each time but I was wondering if there is a way of doing this with one line of script?

Thank you!
Shukhrat
To unsubscribe from this group and stop receiving emails from it, send an email to last...@googlegroups.com.

Martin Isenburg

unread,
Jun 27, 2019, 8:19:30 AM6/27/19
to LAStools - efficient command line tools for LIDAR processing
Hello,

lascanopy can (currently) only compute one canopy cover value at a time. And it's not the '-height_cutoff 2.0' that you need to change but the '-cover_cutoff 5.0'. However, you can use the '-pipe_on' functionality to compute all in one go via command line piping with '|'. Below a little example where the cover cutoff at 2, 5, and 10 meters is computed simultaneously:


lasground -i ..\data\sample.laz ^
                 -wilderness ^
                 -replace_z ^
                 -o sample_normalized.laz 


lascanopy -i  sample_normalized.laz ^
                 -pipe_on ^
                 -files_are_plots ^
                 -names ^
                 -cov -cover_cutoff 2.0 ^
                 -o cov_02m.csv | ^
lascanopy -stdin ^
                 -pipe_on ^
                 -files_are_plots ^
                 -cov -cover_cutoff 5.0 ^
                 -o cov_05m.csv | ^
lascanopy -stdin ^
                 -files_are_plots ^
                 -cov -cover_cutoff 10.0 ^
                 -o cov_10m.csv

C:\LAStools\bin>dir cov_*

06/27/2019  02:14 PM                43 cov_02m.csv
06/27/2019  02:14 PM                25 cov_05m.csv
06/27/2019  02:14 PM                25 cov_10m.csv
               3 Datei(en),             93 Bytes

C:\LAStools\bin>more cov_*
file_name,cov
sample_normalized.laz,71.3
file_number,cov
0,66.5
file_number,cov
0,62.1

Regards,

Martin @rapidlasso

Yogendra Karna

unread,
Sep 24, 2019, 6:56:53 AM9/24/19
to LAStools - efficient tools for LiDAR processing
Hi Martin,

I have tried the same code to produce multiple covers at different cover cut off height as mentioned above but, unfortunately, received the error saying that "ERROR: writing header->min_y" so don't know where I did mistake. Here is the code that I've used. I would appreciate your reply.

C:\Users\ykarna>lascanopy -i "C:\Users\ykarna\OneDrive - The University of Melbourne\ThesisWriting\ChapterThree_SecondPaper\3rd_chapter\data\LidarData\2016_random_plot\AllTogether\normalized\*.las" ^
More? -pipe_on ^
More? -files_are_plots ^
More? -names ^
More? -cov -cover_cutoff 2.0 ^
More? -o cov_02m.csv | ^
More? lascanopy -stdin ^
More? -pipe_on ^
More? -files_are_plots ^
More? -cov -cover_cutoff 5.0 ^
More? -o cov_05m.csv | ^
More? lascanopy -stdin ^
More? -files_are_plots ^
More? -cov -cover_cutoff 10.0 ^
More? -o cov_10m.csv
ERROR: writing header->min_y

C:\Users\ykarna>

Thanks and Regards,
Yogendra













Martin Isenburg

unread,
Oct 2, 2019, 12:22:12 PM10/2/19
to LAStools - efficient command line tools for LIDAR processing
Hello,

you cannot mix '-pipe_on' and multiple input files as neither the file delimitors not the file names would be making in past the piping concept. Make one pipe per tile / file and it will work. I guess I should put in a failure / error message to this accord into the library.

Regards,

Martin

--
Download LAStools at
http://lastools.org
http://rapidlasso.com
Be social with LAStools at
http://facebook.com/LAStools
http://twitter.com/LAStools
http://linkedin.com/groups/LAStools-4408378
Manage your settings at
http://groups.google.com/group/lastools/subscribe
---
You received this message because you are subscribed to the Google Groups "LAStools - efficient tools for LiDAR processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lastools+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lastools/219c581b-eaf5-4b79-91e9-48a3165e9715%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages