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).
Trait Implementations§
source§impl PartialEq for LazVlr
impl PartialEq for LazVlr
impl Eq for LazVlr
impl StructuralPartialEq for LazVlr
Auto Trait Implementations§
impl Freeze for LazVlr
impl RefUnwindSafe for LazVlr
impl Send for LazVlr
impl Sync for LazVlr
impl Unpin for LazVlr
impl UnwindSafe for LazVlr
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more