Module las::vlr

source ·
Expand description

Variable length records are used to store additional metadata not defined in the header.

Variable length records (VLRs) can be “regular” or “extended”. “Regular” vlrs are stored right after the header, before the point records. “Extended” vlrs (EVLRs) are stored at the end of the file, after the point records.

Vlrs contain arbitrary data:

use las::Vlr;
let mut vlr = Vlr::default();
vlr.user_id = "gadomski".to_string();
vlr.record_id = 42;
vlr.description = "Some really important data".to_string();
vlr.data = vec![1, 2, 3];
use las::{Vlr, Builder};
let mut builder = Builder::from((1, 4));

builder.evlrs.push(Vlr::default());
let header = builder.clone().into_header().unwrap();
assert_eq!(1, header.evlrs().len());

builder.version = (1, 2).into(); // las 1.2 doesn't support evlrs
let header = builder.into_header().unwrap();
assert_eq!(0, header.evlrs().len());
assert_eq!(1, header.vlrs().len());

Structs§

  • A variable length record.

Enums§

  • Vlr-specific errors.