Monday 18 March 2019

lidar - Clip multiple .las files data to polygon shapefile using FUSION


I followed this thread in order to clip .las data based off of a polygon shapefile. However I have over 100 .las files I need to clip based off of this polygon and merged into a single .lasd file and I would like to clip them all at once.


The FUSION manual says on page 114 that you can substitute a list of file names instead of a single .las file in order to run the command on a batch of files. I have created a text file list based off of the directory where the .las files are located but I get an error stating that no points fall within the polygon. When I run the command against a single file I do get valid output.


Here is my command:


C:\fusion\polyclipdata C:\_projects\LiDAR\WVC_boundary\WVC_boundary.shp C:\_projects\LiDAR\WVC.las E:\2013_LiDAR_Final\LAS_Final\LAS_StatePlaneFeet\tiles2.txt

Here is an example of my text file containing a list of the file names:


 Volume in drive E is PW_GIS
Volume Serial Number is 74B7-6DCC


Directory of E:\2013_LiDAR_Final\LAS_Final\LAS_StatePlaneFeet

07/15/2015 01:46 PM
.
07/15/2015 01:46 PM
..
08/12/2014 02:46 PM 126,366,636 12TVK0400078000_SPC.LAS
08/12/2014 02:48 PM 209,419,456 12TVK0400079000_SPC.LAS

etc...


Can someone help me create a proper list of file names to be able to run this command against a collection of .las files?




Answer



Oh, this is a DOS thing, not fusion... you want to use DIR /B to generate a list of just the file names (/b means brief). If you want the full paths use DIR /B/S - this will also search all sub directories.


To get a list of just the las files in the current directory into a text file:


DIR /B *.LAS > FileList.txt

(the > means redirect the output into a text file)


To get a list of all las files in the current directory (and all sub directories) with full paths:


DIR /B/S *.LAS > FileList.txt

The text file will be in the current directory but if you wish you can also redirect with a full path to the text file (eg DIR /B/S > C:\SOME\PATH\LIST.TXT)... to append an existing file use >> for example:



dir /b/s .\batch1\*.las > c:\some\path\list.txt
dir /b/s c:\other\path\*.las >> c:\some\path\list.txt

Creates/overwrites on the first command then appends on the second.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...