root/trunk/doc/lasinfo.txt
| Revision 834, 3.9 kB (checked in by hobu, 3 weeks ago) | |
|---|---|
|
|
lasinfo: a utility for inspecting LAS files
| Author: | Martin Isenburg |
|---|---|
| Contact: | isenburg@cs.unc.edu |
| Author: | Howard Butler |
| Contact: | hobu.inc@gmail.com |
| Revision: | $Revision$ |
| Date: | $Date$ |
- 1 Description
- 2 Usage
- 2.1 Simple header inspection
- 2.2 Read from STDIN
- 2.3 Variable Header Records
- 2.4 Check the points for header inconsistencies
- 2.5 Repair missing or inconsistent header information
- 2.6 Update bounding box of LAS file
- 2.7 Set file creation date
- 2.8 Set system identifier
- 2.9 Set generating software header field
- 3 Example data
1 Description
lasinfo prints the header contents by default, and with a switch, can be used to print a short summary of the points. When in summary mode (using the --check switch), differences between header info and point content are reported as warnings. lasinfo prints its information to stderr, and you can use pipes to redirect the output of lasinfo as necessary. lasinfo supports reading from stdin, but it does not attempt to read from stdin if the --stdin switch is not used. lasinfo can also be used to modify a few header entries in-place as described in the examples.
lasinfo is a port of Martin Isenburg's lasinfo utility from LASTools to the libLAS library. For the most part, it is unchanged from Martin's utility except for a few differences:
- It does not scan the points by default and instead you must use the --check switch to have them scanned.
- It does print the Variable Length Records (VLRs) by default.
- Slightly different (and tidier) output format.
- GNU-style arguments and switches (although most of the switches used by Martin's utilities should continue to work).
2 Usage
2.1 Simple header inspection
$ lasinfo lidar.las $ lasinfo --input lidar.las
2.2 Read from STDIN
$ lasinfo --stdin < lidar.las
2.3 Variable Header Records
$ lasinfo --input lidar.las -skip_vlr
will skip the printing of Variable Record Headers (VLRs) for the file.
2.4 Check the points for header inconsistencies
$ lasinfo --input lidar.las --check
scans over all the points and reports any differences with the header. Descriptive information like minimums and maximums of various variables (time, x, y, z, etc) and some basic histograms are also reported.
2.5 Repair missing or inconsistent header information
$ lasinfo --input lidar.las --repair
will add missing or repair inconsistent header entries with respect to the points. Items that are repaired with --repair include the bounding box header entries and the point records by return count. Future versions of the software may include other header repair types if they can be done in such a way as to not require rewriting of the file.
2.6 Update bounding box of LAS file
$ lasinfo --input lidar.las --repair_boundingbox
reads all points, computes their bounding box, and updates it in the header.
2.7 Set file creation date
$ lasinfo -i lidar.las --file_creation 8 2007
sets the file creation day/year in the header to 8/2007. With accordance to the ASPRS LAS specification, this literally means the 8th day of 2007.
2.8 Set system identifier
$ lasinfo -i lidar.las --system_identifier "hello world!"
copies the first 31 characters of the string into the system_identifier field of the header.
2.9 Set generating software header field
$ lasinfo -i lidar.las -generating_software "this is a test (-:"
copies the first 31 characters of the string into the generating_software field of the header.
3 Example data
try these sources for sample lidar data in LAS format:
http://www.geoict.net/LidarData/Data/OptechSampleLAS.zip
http://www.qcoherent.com/data/LP360_Sample_Data.rar
http://www.appliedimagery.com/Serpent%20Mound%20Model%20LAS%20Data.las
