Struct las::header::Builder

source ·
pub struct Builder {
Show 16 fields pub date: Option<NaiveDate>, pub file_source_id: u16, pub generating_software: String, pub gps_time_type: GpsTimeType, pub guid: Uuid, pub has_synthetic_return_numbers: bool, pub has_wkt_crs: bool, pub padding: Vec<u8>, pub point_format: Format, pub point_padding: Vec<u8>, pub system_identifier: String, pub transforms: Vector<Transform>, pub version: Version, pub vlr_padding: Vec<u8>, pub vlrs: Vec<Vlr>, pub evlrs: Vec<Vlr>, /* private fields */
}
Expand description

Builds headers.

Fields§

§date: Option<NaiveDate>

The date of file creation.

§file_source_id: u16

The file source id, sometimes the flight line.

§generating_software: String

The software that created this file.

§gps_time_type: GpsTimeType

The type of gps time, either week or standard.

§guid: Uuid

A globally unique identifier.

§has_synthetic_return_numbers: bool

Are the return numbers in this file syntheetic?

§has_wkt_crs: bool

Does this file has a WKT CRS?

§padding: Vec<u8>

Bytes after the header but before the vlrs.

§point_format: Format

The format that the points will be written in.

§point_padding: Vec<u8>

The bytes after the points but before any evlrs.

Discouraged.

§system_identifier: String

The system that generated the points.

§transforms: Vector<Transform>

The scale and offset that will be used to convert coordinates to i16s to write in the file.

§version: Version

The las version.

§vlr_padding: Vec<u8>

The bytes after the vlrs but before the points.

§vlrs: Vec<Vlr>

The variable length records.

§evlrs: Vec<Vlr>

The extended variable length records.

Implementations§

source§

impl Builder

source

pub fn new(raw_header: Header) -> Result<Builder>

Creates a new builder from a raw header.

§Examples
use las::Builder;
let builder = Builder::new(Default::default()).unwrap();
source

pub fn into_header(self) -> Result<Header>

Converts this builder into a Header.

§Examples
use las::Builder;
let header = Builder::new(Default::default()).unwrap().into_header().unwrap();

Trait Implementations§

source§

impl Clone for Builder

source§

fn clone(&self) -> Builder

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 Builder

source§

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

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

impl Default for Builder

source§

fn default() -> Builder

Returns the “default value” for a type. Read more
source§

impl From<Header> for Builder

source§

fn from(header: Header) -> Builder

Converts to this type from the input type.
source§

impl<V: Into<Version>> From<V> for Builder

source§

fn from(version: V) -> Builder

Converts to this type from the input type.

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> 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, 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.