--
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
Hello,
Yes, in Unix like environments, wildcards are intercepted by the shell and expansion is performed at that point. *.laz will be expanded into the full list of files for the command. However, in my experience, when the command line exceeds its maximum length it generally fails immediately with a message to the user:
lasindex.exe -i *.laz
-bash: /cygdrive/c/Programs/lastools/bin/lasindex.exe: Argument list too long
So, I suspect that wine is adding its own quirks.
I’m not sure what the hard limits on the CLI is for Ubuntu, but there are 3 methods I use that will avoid this pitfall:
Use a list of files;
ls *.laz > listoffiles.txt
lasindex.exe –lof listoffiles.txt
Use a loop;
for j in *.laz; do
lasindex.exe –i “$j”
done
use GNU parallel;
parallel lasindex.exe –i {} ::: *.laz
or
parallel lasindex.exe –i {} :::: listoffiles.txt
GNU parallel is by far the most powerful option. It will automatically detect how many cores are present and parallize the operation, allows the user to build complex workflows into functions and then execute the function in parallel, and will even allow you to distribute the workload across multiple machines if your environment is set up properly (I’ve had success with it on a 48 core beowulf cluster). I use it regularly within Cygwin and have not run into any issues; unfortunately I can’t say whether it will or won’t play well with wine.
Cheers,
Mike
Hi,
What you can do is create a text file such as file_list.txt that lists all the names of all the files with one name per line.
Then you give this list of files via the command line switch '-lof' to any of the LAStools. That won't expand the command line under linux.
lasindex -lof file_list.txt
or
wine lasindex -lof file_list.txt
Same with lasground or las2dem or any other tool.
Martin