-
Notifications
You must be signed in to change notification settings - Fork 18
LAS ProjectID Encoding and Representation
LAS GUIDs as encoded in the four ProjectID fields of the LAS header are intended to follow Microsoft-style 4-2-2-2-6 UUIDs with one 4-byte unsigned integer, followed by three 2-byte unsigned integers, followed by one 6-byte unsigned integer. The first three integers are customarily encoded in Little-Endian (LE) format, while the last two integers are encoded in Big-Endian (BE) format as follows:
4u-2u-2u-2u-6u
LE-LE-LE-BE-BE
Since the LAS file uses Little-Endian encoding, the final two integers are encoded in LAS as an 8-byte unsigned char
array to maintain byte order.
LAS data types: U32 - U16 - U16 - CC - CCCCCC
LAS Project ID: | p1 | p2 | p3 | p4 |
It is customary to represent GUIDs as a string in hexadecimal format, with two characters for each byte. The following presents several representations of the same GUID using different interpretations of the LAS Project ID raw data:
Standard Hex GUID String: 00112233-4455-6677-8899-AABBCCDDEEFF
LAS Project ID (raw bytes): [33 22 11 00][55 44][77 66][88 99 AA BB CC DD EE FF] <-- note BE order of the last section
LAS Project ID (integers): [1122867 ][17493][26231][136 153 170 187 204 221 238 255] <-- note LE interpretation of first 3 sections
LAS Project ID (raw bits): [00110011 00100010 00010001 00000000]
[01010101 01000100]
[01110111 01100110]
[10001000 10011001 10101010 10111011 11001100 11011101 11101110 11111111]
Download samples:
Because the fourth ProjectID field is an unsigned char
array, some users have elected to manipulate the GUID such that it spells out a word relevant to the project when the unsigned char
values are interpreted literally against the standard ASCII table. For example:
Standard Hex GUID String: 00112233-4455 -6677 -4D79-50726F6A3031
LAS Project ID (raw bytes): 33221100-5544 -7766 -4D79-50726F6A3031
LAS Project ID (literal): 1122867 -17493-26231-M y P r o j 0 1 <-- literally, "MyProj01"
U32 - U16 - U16 - C x8
Note that ASCII values 128 and above, which usually comprise accented letters (e.g., "ü"), do not have a globally standard representation and will vary widely based on your region.
Download samples:
Following these recommendations is not required for a compliant LAS file because Project ID values are primarily for your own internal use. Hopefully, though, this gives you some ideas for your own implementations.
Read more here:
Need to know more? Want a wiki page on another topic? Found an error? Submit an issue or contact the LAS Working Group at [email protected].