lasclip strange behavior

56 views
Skip to first unread message

Mauro Assis

unread,
Jun 23, 2017, 8:49:58 PM6/23/17
to LAStools - efficient tools for LiDAR processing
Hi,

I´m trying to clip some LiDAR clouds based on skp parcels polygons. I´m running the following command:

lasclip -i G:\Mapa_Biomassa_EBA\VALIDACAO\LIDAR\*.laz  -poly G:\Mapa_Biomassa_EBA\VALIDACAO\Parcelas_separadas\ABUF_CAJ_01.shp -odir G:\Mapa_Biomassa_EBA\VALIDACAO\LIDAR\parcelas\ -o ABUF_CAJ_01.laz

However, lastools is creating the output file in the correct directory but with a name like NP_T-0368_dn_g_n_ch1_5.laz, that´s based on the input file name, not the correct one that´s corresponding to the parcel name.

I tested similar commands (using lasinfo f.e.) and it worked, that is, the output file has the name I specified in -o parameter.

Tks in advance,

Mauro Assis

Martin Isenburg

unread,
Jul 8, 2017, 10:41:34 AM7/8/17
to LAStools - efficient command line tools for LIDAR processing
Hello Mauro,

i think what is happening here is a slight miss-understanding / user error of how lasclip (or most LAStools) process multiple input files. In your command you have a number of inputs as you do not specify an on-the-fly merged file with the '-merged' option. Hence, each of the input files will be clipped against the provided polygon SHP file, each generating an output LAZ file with its own name. You have various ways of influencing that:

(1) nothing is specified, then the files go into the same directory with '_1' added to the file name as either LAS of LAZ. 
(2) use '-odir' then the output goes into the specified output directory and by default files have the same name.
(3) use '-odix' , then the files go into the same directory with the added appendix.
(4) a combination of (2) and (3).

The output file name specification that you use '-o' will only affect the very first file (of multiple). It is usually meant for when there is just one input and one output file. You should see that name also in the specified output directory in place of the name of the first file that was processed.

Only if you either run with the '-merged' or the the '-merged' and the '-split' option does it behave as you expect. Then all output file names will be based on the 'ABUF_CAJ_01.laz' name with numbers added at the end in case the '-split' option was used as that usually produces one file per polygon.


Regards,

Martin @rapidlasso
Reply all
Reply to author
Forward
0 new messages