Fixing LAS Global Encoding

In some cases hardware manufacturers and/or software are not properly setting the Global Encoding bytes in an LAS file according to the LAS specification. That specification dictates the Global Encoding as “a bit field used to indicate certain global properties about the file. In LAS 1.2 (the version in which this field was introduced), only the low bit is defined (this is the bit, that if set, would have the unsigned integer yield a value of 1). This bit field is defined as:

Global Encoding – Bit Field Encoding

Bits Field Name Description
0 GPS Time Type The meaning of GPS Time in the Point Records
0 (not set) -> GPS time in the point record fields is GPS Week Time (the same as previous versions of LAS)
1 (set) -> GPS Time is standard GPS Time (satellite GPS Time) minus 1 x 109. The offset moves the time back to near zero to improve floating point resolution.
1:15 Reserved Must be set to zero

This is very important as the tools within GeoCue, TerraScan and other software expects to be able to use this Global Encoding to make determinations about the LAS file, such as whether the time stamps are stored as GPS Weekseconds or adjusted standard time. The time format is important  in order to properly align the data with other data types.

LIDAR processing being managed by the GeoCue workflow management software begins with source strips and having the wrong encoding on a file can have detrimental effects for the remainder of the workflow. Hence, we have a small utility which can be run in order to “fix” the encoding bytes.

Download LASGlobalEncoding

usage: LASFile [encodingValue]

Running the utility in Command Prompt using the usage as shown above will change the Global Encoding value to that which you specify. Note that this utility is designed to run on LAS v1.2 files only and can only be run on one file at a time.

For example:

Command Prompt Example

Share

GeoCue Support has written 707 articles