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
sourceimpl 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).
Trait Implementations
impl Eq for LazVlr
impl StructuralEq for LazVlr
impl StructuralPartialEq for LazVlr
Auto Trait Implementations
impl RefUnwindSafe for LazVlr
impl Send for LazVlr
impl Sync for LazVlr
impl Unpin for LazVlr
impl UnwindSafe for LazVlr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more