pub struct LazVlr { /* private fields */ }
Expand description
The data stored in the record_data of the Laszip Vlr
This vlr contains information needed to compress or decompress LAZ/LAS data. Such as the points per chunk, the fields & version of the compression/decompression algorithm.
To create one from scratch, see the LazVlrBuilder
Implementations§
source§impl LazVlr
impl LazVlr
sourcepub const DESCRIPTION: &'static str = "https://laszip.org"
pub const DESCRIPTION: &'static str = "https://laszip.org"
The description of the LasZip VLR header.
sourcepub fn from_laz_items(items: Vec<LazItem>) -> Self
pub fn from_laz_items(items: Vec<LazItem>) -> Self
Creates a new LazVlr
With fixed-size chunks.
panics
Will panic if items
is empty or contains invalid items.
sourcepub fn read_from<R: Read>(src: R) -> Result<Self>
pub fn read_from<R: Read>(src: R) -> Result<Self>
Tries to read the Vlr information from the record_data source
pub fn from_buffer<T: AsRef<[u8]>>(buffer: T) -> Result<Self>
sourcepub fn write_to<W: Write>(&self, dst: &mut W) -> Result<()>
pub fn write_to<W: Write>(&self, dst: &mut W) -> Result<()>
Writes the Vlr to the source.
This only write the record_data the header should be written before-hand.
sourcepub fn uses_variable_size_chunks(&self) -> bool
pub fn uses_variable_size_chunks(&self) -> bool
Returns whether the chunk size is variable.
sourcepub fn chunk_size(&self) -> u32
pub fn chunk_size(&self) -> u32
Returns the chunk size, that is, the number of points in each chunk.
This is only valid if Self::uses_variable_size_chunks
returns false.
sourcepub fn items_size(&self) -> u64
pub fn items_size(&self) -> u64
Returns the sum of the size of the laz_items, which should correspond to the expected size of points (uncompressed).