Metadata in a LAS file lives in variable length records (VLRs), which follow the
header, and, from LAS 1.4, in extended variable length records (EVLRs), which follow
the points and can be larger. Each record is identified by a User ID and a Record ID.
The specification owns the User IDs LASF_Spec and
LASF_Projection; anyone else should use a User ID of their own, and
readers skip records they do not know.
VLR header
54 bytes, then Record Length After Header bytes of data. The header’s
Number of Variable Length Records says how many there are.
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 2 | uint16 | Reserved | 0. In LAS 1.0 this was a record signature, 0xAABB |
| 2 | 16 | char[16] | User ID | Owner of the record, padded with zero bytes |
| 18 | 2 | uint16 | Record ID | Record type, meaningful only together with the User ID |
| 20 | 2 | uint16 | Record Length After Header | Size of the data, at most 65,535 bytes |
| 22 | 32 | char[32] | Description | Optional text |
EVLR header
60 bytes. EVLRs start at the header’s Start of First Extended Variable Length
Record and follow one another. A file that must stay readable by older
software uses only VLRs.
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 2 | uint16 | Reserved | 0 |
| 2 | 16 | char[16] | User ID | As for VLRs |
| 18 | 2 | uint16 | Record ID | As for VLRs |
| 20 | 8 | uint64 | Record Length After Header | Size of the data |
| 28 | 32 | char[32] | Description | Optional text |
Records the specification defines
| User ID | Record ID | Record | Status |
|---|---|---|---|
LASF_Projection | 2111 | OGC math transform WKT | Optional |
LASF_Projection | 2112 | OGC coordinate system WKT | The coordinate system when the WKT bit is set |
LASF_Projection | 34735 | GeoKeyDirectoryTag | The coordinate system for formats 0 to 5 without WKT; not allowed in 1.5 |
LASF_Projection | 34736 | GeoDoubleParamsTag | Optional, with 34735 |
LASF_Projection | 34737 | GeoAsciiParamsTag | Optional, with 34735 |
LASF_Spec | 0 | Classification lookup | Optional; deprecated in 1.5 |
LASF_Spec | 3 | Text area description | Optional |
LASF_Spec | 4 | Extra bytes | Optional; at most one |
LASF_Spec | 7 | Superseded | Marks a record as replaced |
LASF_Spec | 100 to 354 | Waveform packet descriptor | Needed for formats 4, 5, 9, 10 |
LASF_Spec | 65535 | Waveform data packets (EVLR) | Waveform data inside the file |
Coordinate system records
Which form is used depends on the point format and the header’s WKT bit (Global Encoding bit 4):
| Point formats | WKT bit clear | WKT bit set |
|---|---|---|
| 0 to 5 | GeoTIFF keys | WKT |
| 6 to 10 | Not allowed | WKT |
WKT records
Record 2112 holds the coordinate system as OGC Well Known Text, ended by a zero byte; record 2111 holds a math transform in the same way. In LAS 1.5 any published WKT version may be used, and the record may be a VLR or an EVLR.
GeoTIFF keys
Record 34735 is an array of uint16 values in the layout of the GeoTIFF
GeoKeyDirectoryTag: a header of four values, then four values per
key.
| Field | Meaning |
|---|---|
wKeyDirectoryVersion | 1 |
wKeyRevision | 1 |
wMinorRevision | 0 |
wNumberOfKeys | Number of keys that follow |
wKeyID | A GeoTIFF key, such as 3072 (ProjectedCSTypeGeoKey) |
wTIFFTagLocation | 0: the value is in wValue_Offset; 34736: it is a double at that index in record 34736; 34737: it is text at that index in record 34737 |
wCount | Number of characters for text values, otherwise 1 |
wValue_Offset | The value, or the index described above |
Record 34736 is an array of float64 values and record 34737 an array of ASCII text,
each value ended by a |, which the keys point into.
Classification lookup
256 entries of 16 bytes: a uint8 class number then a 15-character description, naming the classes a file uses. Deprecated in LAS 1.5.
Text area description
Free text describing the data, such as how it was collected or processed.
Extra bytes
Describes the bytes after the standard fields of every point record. The data is an array of 192-byte entries, one per extra attribute, in the order the attributes sit in the record.
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 2 | uint8[2] | reserved | 0 |
| 2 | 1 | uint8 | data_type | Type of the attribute; see below |
| 3 | 1 | uint8 | options | Bits saying which fields below apply; for data type 0, the attribute’s size in bytes |
| 4 | 32 | char[32] | name | Attribute name |
| 36 | 4 | uint8[4] | unused | 0 |
| 40 | 8 | any | no_data | Value meaning “no data” |
| 48 | 16 | uint8[16] | deprecated1 | 0 |
| 64 | 8 | any | min | Smallest value |
| 72 | 16 | uint8[16] | deprecated2 | 0 |
| 88 | 8 | any | max | Largest value |
| 96 | 16 | uint8[16] | deprecated3 | 0 |
| 112 | 8 | float64 | scale | Multiplier |
| 120 | 16 | uint8[16] | deprecated4 | 0 |
| 136 | 8 | float64 | offset | Added after scaling |
| 144 | 16 | uint8[16] | deprecated5 | 0 |
| 160 | 32 | char[32] | description | Description of the attribute |
The 8-byte no_data, min and max fields hold the
value widened to 8 bytes: floats as float64, unsigned integers as uint64 and signed
ones as int64.
Data types
| Value | Type | Size |
|---|---|---|
| 0 | Undocumented bytes | Given by options |
| 1 | uint8 | 1 |
| 2 | int8 | 1 |
| 3 | uint16 | 2 |
| 4 | int16 | 2 |
| 5 | uint32 | 4 |
| 6 | int32 | 4 |
| 7 | uint64 | 8 |
| 8 | int64 | 8 |
| 9 | float32 | 4 |
| 10 | float64 | 8 |
| 11 to 30 | Deprecated (two- and three-value arrays of types 1 to 10 in earlier revisions) | – |
| 31 to 255 | Reserved | – |
Options bits
| Bit | Name | Meaning |
|---|---|---|
| 0 | no_data_bit | no_data is meaningful |
| 1 | min_bit | min is meaningful |
| 2 | max_bit | max is meaningful |
| 3 | scale_bit | Multiply each value by scale |
| 4 | offset_bit | Then add offset |
Superseded
Software that rewrites a file and wants an existing VLR or EVLR to be ignored changes that record’s Record ID to 7, Superseded.
Waveform packet descriptor
Record IDs 100 to 354 describe how waveforms are stored; record 100 + n − 1 is the descriptor that points with Wave Packet Descriptor Index n use. Each holds 26 bytes:
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 1 | uint8 | Bits per Sample | Bits in each waveform sample, 2 to 32 |
| 1 | 1 | uint8 | Waveform Compression Type | 0, no compression; other values are reserved |
| 2 | 4 | uint32 | Number of Samples | Samples in each waveform |
| 6 | 4 | uint32 | Temporal Sample Spacing | Time between samples in picoseconds |
| 10 | 8 | float64 | Digitizer Gain | Volts = offset + gain × sample value |
| 18 | 8 | float64 | Digitizer Offset |
The waveform data packets themselves are an EVLR with Record ID 65535 (or a
.wdp file beside the LAS file), holding the raw samples that each point’s
byte offset and packet size point into.