lasinfo-old¶
- Author:
Martin Isenburg
- Contact:
- Author:
Howard Butler
- Contact:
Description¶
lasinfo-old 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-old prints its information to stderr, and you can use pipes to redirect the output of lasinfo-old as necessary. lasinfo-old supports reading from stdin, but it does not attempt to read from stdin if the –stdin switch is not used. lasinfo-old can also be used to modify a few header entries in-place as described in the examples.
lasinfo-old is a port of Martin Isenburg’s lasinfo-old 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).
Usage¶
Simple header inspection¶
$ lasinfo-old lidar.las
$ lasinfo-old --input lidar.las
Read from STDIN¶
$ lasinfo-old --stdin < lidar.las
Variable Header Records¶
$ lasinfo-old --input lidar.las -skip_vlr
will skip the printing of Variable Record Headers (VLRs) for the file.
Check the points for header inconsistencies¶
$ lasinfo-old --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.
Repair missing or inconsistent header information¶
$ lasinfo-old --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.
Update bounding box of LAS file¶
$ lasinfo-old --input lidar.las --repair_boundingbox
reads all points, computes their bounding box, and updates it in the header.
Set file creation date¶
$ lasinfo-old -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.
Set system identifier¶
$ lasinfo-old -i lidar.las --system_identifier "hello world!"
copies the first 31 characters of the string into the system_identifier field of the header.
Set generating software header field¶
$ lasinfo-old -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.
Example data¶
Visit the libLAS sample library for LiDAR data in LAS format: