LAStools log file

289 views
Skip to first unread message

Susana Gonzalez

unread,
Nov 3, 2014, 8:30:11 AM11/3/14
to last...@googlegroups.com

Hi,

I would like to open LAStools log file, to see the information in chronological order about all my LiDAR processes. I know that I can see the console but sometimes I would like to re-run the same command with an extra parameter and would be easier if I have access to the log file.

Is this possible? Where is saved the log file in LAStools?

Thank you

 

Susana Gonzalez

Forest Engineer, LiDAR Science

 

Interpine Group Ltd
NZ Office :  07 350 3209 extn 722

Australia:    02 8011 3645

Fax :             07 345 7571
Address :     99 Sala Street, PO Box 1209, Rotorua 3010, New Zealand
Website :   
  www.interpine.co.nz

 

Evon Silvia

unread,
Nov 6, 2014, 1:40:42 AM11/6/14
to last...@googlegroups.com
As far as I know, there isn't one - stdout would be the only source of that information. Excellent request, though! I, too, have always wanted a way to record both the output of LAStools and my input command(s) to a txt/log file. Something like...

las2las -i example.las -o example_out.las -log_A mylog.log

In this example, I would picture three usefuloptions:
  • -log (implicitly append an existing file)
  • -log_A (explicitly append)
  • -log_T (truncate or replace an existing file)
Does something like this exist and I missed it somehow?

Evon
--
Evon Silvia PLS
Geomatics Specialist

Quantum Spatial
517 SW 2nd Street, Suite 400, Corvallis, OR 97333


Antonio Ruiz

unread,
Nov 7, 2014, 6:07:01 AM11/7/14
to last...@googlegroups.com
Could you try with the standard piping of the operating system (MS windows, Unix...)? I believe it will work.

las2las -i example.las -o example_out.las > mylog.log

creates a new file or replaces an existing one and

las2las -i example.las -o example_out.las >> mylog.log

appends the to an existing file

Albert Godfrind

unread,
Nov 8, 2014, 1:45:24 AM11/8/14
to last...@googlegroups.com
I agree that rather than overloading the commands with more parameters, directing the console output to a file is the elegant way to go, just like for any command output.

However the trouble with the simple redirect is that all stdout goes to the file, and you do not get any feedback on the console. The proper way to redirect both to a file and to the console is to use the “tee” command. Also make sure to redirect both stdout and stderr:

las2las -i example.las -o example_out.las 2>&1 | tee mylog.log

or, to append:

las2las -i example.las -o example_out.las 2>&1 | tee -a mylog.log

Unfortunately, the tee command does not exist on windows. Maybe it is with the Cygnus package ?

Albert
--
ORACLE
Albert Godfrind | Geospatial technologies | Tel: +33 4 93 00 80 67 | Mobile: +33 6 09 97 27 23 | Skype: albert-godfrind
Oracle Server Technologies
400 Av. Roumanille,
 BP 309  | 06906 Sophia Antipolis cedex | France
Everything you ever wanted to know about Oracle Spatial




Thomas Knudsen

unread,
Nov 8, 2014, 3:04:37 AM11/8/14
to last...@googlegroups.com
On Saturday, November 8, 2014 7:45:24 AM UTC+1, Albert Godfrind wrote:
Unfortunately, the tee command does not exist on windows. Maybe it is with the Cygnus package ?

tee is included in Gow - Brent Matzelle's "GNU on Windows" package - https://github.com/bmatzelle/gow/wiki
tee is also included in the msys component in OSGeo4W - http://trac.osgeo.org/osgeo4w/

The latter also includes numerous other geoprocessing packages which can be useful for handling las data.





Kirk Waters - NOAA Federal

unread,
Nov 9, 2014, 1:24:38 AM11/9/14
to last...@googlegroups.com
Another unix option is the script command. That would also allow you to log the command you entered and you'd see the output on the screen. Not sure there is a windows equivalent and you do need to remember to exit at some point.


Kirk Waters, PhD                     | NOAA Office for Coastal Management
Applied Sciences Program      | 2234 South Hobson Ave
843-740-1227                          | Charleston, SC 29405    

Chris Ryan

unread,
Nov 9, 2014, 1:36:40 AM11/9/14
to last...@googlegroups.com
There is a utility called mtee.exe that can do similar stream splitting on Windows.

Cheers,

Chris Ryan

Disclaimer, Please Note: The information contained in this email and any attached files is strictly private and confidential. This email should be read by the intended addressee only. If the recipient of this message is not the intended addressee, please call +61 2 6251 0002 and promptly delete this email and any attachments. Thank you

Evon Silvia

unread,
Nov 11, 2014, 3:40:55 AM11/11/14
to last...@googlegroups.com
I wasn't able to get the MS-DOS emulator on Windows 7 to output stdout to a text file in that manner, but I may have botched the syntax. Doesn't Martin's piping mechanism utilize stdout to stream data between programs, though? I might be remembering that incorrectly.

Evon

Kirk Waters - NOAA Federal

unread,
Nov 11, 2014, 1:35:07 PM11/11/14
to last...@googlegroups.com
My recollection is that a lot of the log type info is printed to stderr, not stdout. You may have to redirect it to stdout before sending to mtee. On unix that would be with 2>&1 (meaning redirect file descriptor 2, stderr, into file descriptor 1, stdout). Not sure on Windows, but worth a shot.

Kirk Waters, PhD                     | NOAA Office for Coastal Management
Applied Sciences Program      | 2234 South Hobson Ave
843-740-1227                          | Charleston, SC 29405    

Reply all
Reply to author
Forward
0 new messages