clip LiDAR data by plot

已查看 416 次
跳至第一个未读帖子

Dwight Crouse

未读,
2017年1月6日 11:26:362017/1/6
收件人 LAStools - efficient tools for LiDAR processing
Hi Martin,

When doing a lasclip command, is there a way to retain a plot-id in the that is stored in a shapefile attribute field, putting that plot-id in the resulting filename of the clipped LiDAR data?  Looking at the read-me file maybe I just missed something?  Seems like something that would be extremely helpful.

Dwight


Tobias K Kohoutek

未读,
2017年1月13日 07:22:042017/1/13
收件人 LAStools - efficient tools for LiDAR processing
I would like to give this topic a push and add lascanopy to also name the resulting files (if one choses height metrics for -lop or each file is a plot) to name the files with an attribute or with the same filename. Right now it counts from 1 to X

Cheers,
Tobias

Irf

未读,
2017年1月27日 04:27:182017/1/27
收件人 LAStools - efficient tools for LiDAR processing
Hi Tobias,

I have yet to test it using lasclip, but I am sure about 'lascanopy' that you can get names in the output files. All you need to add is '-names' in the command line. It should look something like (also given in the README file):

lascanopy -i *.laz -files_are_plots -int_avg -int_std -cov -gap -names -o output.csv  

Regards,
Irf

Tobi

未读,
2017年1月27日 07:10:222017/1/27
收件人 last...@googlegroups.com
Hey Irf,

cool, I didn't know that. (probably Martin has it in his readme file and I didn't check for it)
Thanks for the hint!

Cheers,
Tobias

Paul Magdon

未读,
2017年11月22日 14:54:132017/11/22
收件人 LAStools - efficient tools for LiDAR processing

Hi everyone,

I also like to push this issue. Lasclip runs excelent but when we have a large set of plots e.g. 100 we need to have an option to name the output lasfiles according to an attribute of the polygones e.g. plot_id.

I tested the suggestion to use '-names' but this is not available for lasclip.

Any suggestions?

Greetins Paul

Martin Isenburg

未读,
2017年11月22日 15:00:012017/11/22
收件人 LAStools - efficient command line tools for LIDAR processing
Hello from Melbourne,

Good timing. I just finished implementing this and you can help beta-testing this new functionality. Download the updated tool here:


And then

lasclip -i lotsoflidar/*.laz -merged ^
           -poly myplots.shp ^
           -split SomeName ^
           -odir outputplots ^
           -olaz

Or

lasclip -i lotsoflidar/*.laz -merged ^
           -poly myplots.shp ^
           -split 3 ^
           -odir outputplots ^
           -olaz

Where SomeName is the name of the string field with the output file name or 3 is the index of the string field (count starts at 0) in the DBF file.

Regards,

Martin

Susana Gonzalez

未读,
2017年11月27日 15:56:572017/11/27
收件人 last...@googlegroups.com

Martin,

I have run your script, works great!

Thanks

Susana

cai...@vicforests.com.au

未读,
2017年11月29日 14:03:162017/11/29
收件人 last...@googlegroups.com
Hi Martin,

I did try lasclip using multi plots. The question is that is it possible to name the out put laz file as the same as the clip shapefile's ID?



Regards

Cai Li  I  GIS Analyst, Resources  I  VicForests

Level 12, 461 Bourke Street, Melbourne  Vic  3000  I  G P O Box 191, Melbourne   Vic   3001

T:  +61 03 9608 9571  I   F:  +61 03 9608 9566  I  E:  cai...@vicforests.com.au


Notice:

This email and any attachments may contain information that is personal,
confidential, legally privileged and/or copyright. No part of it should be
reproduced, adapted or communicated without the prior written consent of the
copyright owner.

It is the responsibility of the recipient to check for and remove viruses.

If you have received this email in error, please notify the sender by return
email, delete it from your system and destroy any copies. You are not authorised
to use, communicate or rely on the information contained in this email.

Please consider the environment before printing this email.

Susana Gonzalez

未读,
2017年11月29日 16:37:402017/11/29
收件人 last...@googlegroups.com

Hi Cai,

Have a look in this email from Martin.

Cheers

Susana

cai...@vicforests.com.au

未读,
2017年11月29日 22:34:282017/11/29
收件人 last...@googlegroups.com
Hi Martin,

When doing a lascanopy command, is there way to put laz filename of input Lidar data in the output csv file?

Regards

Cai Li  I  GIS Analyst, Resources  I  VicForests

Level 12, 461 Bourke Street, Melbourne  Vic  3000  I  G P O Box 191, Melbourne   Vic   3001

T:  +61 03 9608 9571  I   F:  +61 03 9608 9566  I  E:  cai...@vicforests.com.au

Susana Gonzalez

未读,
2017年11月29日 22:46:532017/11/29
收件人 last...@googlegroups.com

Hi again,

You could use the plot name without clipping them

 

Plot list in a txt file: PlotName X Y Radius (space between columns)

 

C:\LAStools\bin\lascanopy.exe -v -i %NORMALISE%\*.laz ^

-names -loc %PLOTS%\Plots.txt ^

-p 25 75 95 ^

-fractions ^

-o %PLOTMETRICS%\Plots_metrics.csv

 

Cheers

Susana

 

From: last...@googlegroups.com [mailto:last...@googlegroups.com] On Behalf Of cai...@vicforests.com.au


Sent: Thursday, 30 November 2017 4:26 PM
To: last...@googlegroups.com

--

cai...@vicforests.com.au

未读,
2017年11月29日 23:46:542017/11/29
收件人 last...@googlegroups.com
Thank you Susana,

Actually, I am using irregular shape polygons to test a lascanopy tool, so have to use clipped lidar point file that named as polygon id.

if without -name and input polygon shape file, the result likes

lascanopy -lof file_list.3192.txt -files_are_plots ^

-all -min -max -avg -std -ske -kur -qav -p ... 25 50 75 90 95 99 ^

-fractions -odir %outputcsv% -ocsv


if i try -name .... as blow

lascanopy -lof file_list.3192.txt -files_are_plots ^

-all -min -max -avg -std -ske -kur -qav -p ... 25 50 75 90 95 99 ^

-fractions -odir %outputcsv% -ocsv ^

-names -lop %polygon%\polyg.shp

the result likes



Regards

Cai Li  I  GIS Analyst, Resources  I  VicForests

Level 12, 461 Bourke Street, Melbourne  Vic  3000  I  G P O Box 191, Melbourne   Vic   3001

T:  +61 03 9608 9571  I   F:  +61 03 9608 9566  I  E:  cai...@vicforests.com.au




From:        Susana Gonzalez <susana....@interpine.nz>
To:        "last...@googlegroups.com" <last...@googlegroups.com>,

Iain Clarke

未读,
2017年12月6日 01:38:362017/12/6
收件人 last...@googlegroups.com

Hi Martin,

I'm also keen to beta-test this mod, but I can't access the link due to the UTAS security systems.

Would you be able to place in a Google Drive folder and forward me the link please? Or some other method to

access the new lasclip.exe?

Cheers,

Iain Clarke

PhD Candidate

University of Tasmania


From: last...@googlegroups.com <last...@googlegroups.com> on behalf of Susana Gonzalez <susana....@interpine.nz>
Sent: Thursday, 30 November 2017 7:40 AM
To: last...@googlegroups.com
Subject: RE: [LAStools] Naming clip LiDAR data as plot id
 



University of Tasmania Electronic Communications Policy (December, 2014).
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.

Martin Isenburg

未读,
2017年12月6日 16:51:542017/12/6
收件人 LAStools - efficient command line tools for LIDAR processing
Hello Iain,

that tools is already updated in the latest release of LAStools (171124) along with these changes:

24 November 2017 -- lascanopy: use option '-height_in_attribute 0' if height is stored as additional attribute
22 November 2017 -- las2txt: parse extra bytes attributes with indices larger than 9 by bracketing (12) them 
21 November 2017 -- txt2las: allow adding up to 32 (from 10) additional extra bytes attributes
21 November 2017 -- lasclip: use output file name from DBF attribute of SHP file with '-split Plot_Name'
17 November 2017 -- LASlib: new transform '-copy_intensity_into_NIR' (makes only sense for point type 8)
7 November 2017 -- lasthin: new '-gps_time 0.01' thins per 0.01 sec intervals instead of per spatial cells
30 October 2017 -- las2las: new option '-vertical_evrf2007' for European Vertical Reference Frame 2007
26 October 2017 -- lasthin: optional minimum number of points needed for option '-percentile 40 10'
15 October 2017 -- lasclassify: use height above ground from additional attribute with '-height_in_attribute 0'
14 October 2017 -- lasinfo: new WARNING when bounding box in LAS header miss-matches coordinate resolution

reminder again on how to use this new option in lasclip:
 
lasclip -i lotsoflidar/*.laz -merged ^
           -poly myplots.shp ^
           -split SomeName ^
           -odir outputplots ^
           -olaz
 
Or
 
lasclip -i lotsoflidar/*.laz -merged ^
           -poly myplots.shp ^
           -split 3 ^
           -odir outputplots ^
           -olaz
 
Where SomeName is the name of the string field with the output file name or 3 is the index of the string field (count starts at 0) in the DBF file.

Martin Isenburg

未读,
2017年12月15日 23:49:002017/12/15
收件人 LAStools - efficient command line tools for LIDAR processing
Hello Cai,

to add the input file name to the output CSV simply add '-names' to the command line.

E:\LAStools\bin>dir plots_0000*.laz
12/16/2017  05:40 AM           161,636 plots_000000.laz
12/16/2017  05:40 AM           112,384 plots_000001.laz
12/16/2017  05:40 AM           119,599 plots_000002.laz
12/16/2017  05:40 AM           164,300 plots_000003.laz
12/16/2017  05:40 AM           131,650 plots_000004.laz
12/16/2017  05:40 AM           120,251 plots_000005.laz
12/16/2017  05:40 AM           127,704 plots_000006.laz
12/16/2017  05:40 AM           100,868 plots_000007.laz

E:\LAStools\bin>lascanopy -i plots_0000*.laz ^
                                            -files_are_plots ^
                                            -names ^
                                            -all -min -max -ske ^
                                            -o plots.csv

E:\LAStools\bin>more plots.csv
file_name,all,min,max,ske
plots_000000.laz,32191,1.37,42.3,-0.86
plots_000001.laz,22234,1.37,39.54,0.47
plots_000002.laz,23827,1.37,38.69,-0.79
plots_000003.laz,32548,1.37,41.92,-1.05
plots_000004.laz,26330,1.37,26.09,-0.72
plots_000005.laz,24508,1.6,43.91,-0.91
plots_000006.laz,25374,1.37,42.06,-0.1
plots_000007.laz,20186,1.39,32.04,-0.51

Regards,

Martin @rapidlasso

Silvia Losada

未读,
2020年2月4日 19:04:382020/2/4
收件人 LAStools - efficient tools for LiDAR processing
Hello Martin,

I am using LasCanopy GUI and I am having the same issue as Cai.  I have 87 forestry plots that need to be distinguished by plot ID, and I would like the output of lasCanopy to be a single csv file with 87 rows, one row per plot and also have the plot IDs displayed in a column so I can generate correlations with field plots. I have clipped the LiDAR point cloud using a shapefile of the plots so that I have 87 individual las files for each plot. The name of each las file has the corresponding Plot ID. 

When I used the "process all files",  "files_are_plots" and "merged" command, the output of lasCanopy results in a csv file with a single row, it seems like the tool ends once it processes the first las file. So I tried using your suggestion of adding "-names" into the command line but that results in the same thing, except the first column shows the file path of the first las file. If I don't use the "merged" command, the output generates 87 separate csv files with one row each, each csv file name is the plot ID. So I would have to manually copy paste each separate row into a single csv file.


lascanopy_issue1.jpg  

lascanopy_issue2.jpg




On the other hand, I also tried using the plot shapefile instead using the "lop" feature in the following way:  (-lop "E:\\All_Plots.shp"), and the output csv file has all the plots in a single file but does not show the ID numbers (Column A).



lascanopy_issue4.jpg



 As per the documentation, I also tried using the index number of the ID column of the shapefile's DBF file, with the index being 1, (-lop "E:\\All_Plots.shp" 1) but for some reason lasCanopy cannot read it, I get an error that says: "cannot understand argument '1'. " I suspect this is happening because the 1 is outside the parenthesis, but i also tried with the 1 inside the parenthesis and the error indicates that the file cannot be open. I also used the name of the ID column but the same issue occurs.

lascanopy_issue3.jpg



Is there a way I can work around this so that I can have a Plot ID column along with the metrics extracted from lasCanopy in a single csv file?

Thank you in advance for your help.

Best regards,

Silvia Losada

On Thu, Nov 30, 2017 at 5:43 AM, <ca...@vicforests.com.au> wrote:
Thank you Susana,

Actually, I am using irregular shape polygons to test a lascanopy tool, so have to use clipped lidar point file that named as polygon id.

if without -name and input polygon shape file, the result likes

lascanopy -lof file_list.3192.txt -files_are_plots ^

-all -min -max -avg -std -ske -kur -qav -p ... 25 50 75 90 95 99 ^

-fractions -odir %outputcsv% -ocsv


if i try -name .... as blow

lascanopy -lof file_list.3192.txt -files_are_plots ^

-all -min -max -avg -std -ske -kur -qav -p ... 25 50 75 90 95 99 ^

-fractions -odir %outputcsv% -ocsv ^

-names -lop %polygon%\polyg.shp

the result likes



Regards

Cai Li  I  GIS Analyst, Resources  I  VicForests

Level 12, 461 Bourke Street, Melbourne  Vic  3000  I  G P O Box 191, Melbourne   Vic   3001

lascanopy_issue1.jpg

Irf

未读,
2020年3月12日 10:09:422020/3/12
收件人 LAStools - efficient tools for LiDAR processing
Hi Silvia,

To be able to extract canopy metrics, you do not need to clip your point cloud data to plot boundaries. You can use the following line of code to get your desired output.

lascanopy -cpu64 -i pointcloud.laz -merged -files_are_plots -names -lop your_shapefile_with_all_plots.shp Plot_No -centroids -height_cutoff 0.1 -abv -all -odir path_to_output_directory/ -o output.csv

merged: if you have a tiled or split-by-plot point cloud - observe caution when using tiled point clouds (ref: https://rapidlasso.com/2015/08/07/use-buffers-when-processing-lidar-in-tiles/)
lop: polygon shapefile
Plot_No: name of the field containing plot IDs as it appears in your_shapefile_with_all_plots.shp. An index can be used but that in your case, I believe, might not be 1.
centroids: writes the centre coordinates for each of your plots to the output csv
height_cutoff 0.1: usually a height_cutoff of 1.3 or 2 is used; not sure why you would use a height_cutoff that is below ground. If your point cloud is normalised, which I believe should be, then use a height_cutoff greater than zero.

I hope this helps.

Regards,
Irf
回复全部
回复作者
转发
0 个新帖子