Monday, December 28, 2015

How to fix a Lidar LAS file with a "version minor out of range" error

Recently I encountered some difficulties in working with LiDAR las files using open source software that make use of the liblas library. When attempting to open up the las file, the software would error out with a message complaining about "version minor out of range", as shown in the screenshot below.

After some investigation, it turned out that the file format version (at 1.4)  of the las file is higher than was supported by the software. In order to solve the issue, the las file can be downgraded to a lower file format version e.g. 1.2.

To convert the las file to version 1.2, you can use the pdal utility from the open source software Point Data Abstraction Library (PDAL). After downloading and installing, you can type in the following at the Command Prompt.

C:\> pdal translate --writers.las.minor_version=2 input.las output.las



The resultant file can now be opened, e.g. using the lasinfo utility as shown below.

No comments:

Related Posts with Thumbnails