Struct pasture_io::las::LASMetadata

source ·
pub struct LASMetadata { /* private fields */ }
Expand description

Metadata implementation for LAS/LAZ files

Implementations§

source§

impl LASMetadata

source

pub fn new(bounds: AABB<f64>, point_count: usize, point_format: Format) -> Self

Creates a new LASMetadata from the given parameters


let min = Point3::new(0.0, 0.0, 0.0);
let max = Point3::new(1.0, 1.0, 1.0);
let format = pasture_io::las_rs::point::Format::new(0).unwrap();
let metadata = LASMetadata::new(AABB::from_min_max(min, max), 1024, format);
source

pub fn point_count(&self) -> usize

Returns the number of points for the associated LASMetadata

source

pub fn point_format(&self) -> Format

Returns the LAS point format for the associated LASMetadata

source

pub fn raw_las_header(&self) -> Option<&Header>

Returns the raw LAS header for the associated LASMetadata. This value is only present if the associated LASMetadata was created from a raw LAS header

source

pub fn classification_lookup_vlr(&self) -> Option<&ClassificationLookup>

Returns the Classification Lookup VLR, if it exists

source

pub fn text_area_description_vlr(&self) -> Option<&TextAreaDescription>

Returns the Text Area Description VLR, if it exists

source

pub fn extra_bytes_vlr(&self) -> Option<&ExtraBytesVlr>

Returns the Extra Bytes VLR, if it exists

Trait Implementations§

source§

impl Clone for LASMetadata

source§

fn clone(&self) -> LASMetadata

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LASMetadata

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for LASMetadata

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Metadata for LASMetadata

source§

fn bounds(&self) -> Option<AABB<f64>>

Returns the bounding box of the associated Metadata. Not every point cloud Metadata will have bounding box information readily available, in which case None is returned.
source§

fn number_of_points(&self) -> Option<usize>

Returns the number of points of the associated Metadata. Not every point cloud Metadata will have the number of points readily available, in which case None is returned.
source§

fn get_named_field(&self, field_name: &str) -> Option<Box<dyn Any>>

Returns the value of the metadata field named field_name, if it exists.
source§

fn clone_into_box(&self) -> Box<dyn Metadata>

Clone the associated Metadata and put it into a Box
source§

impl TryFrom<&Header> for LASMetadata

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(header: &Header) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Header> for LASMetadata

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Header) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.