LASPoint

Struct LASPoint 

Source
pub struct LASPoint {
Show 29 fields pub x: i32, pub y: i32, pub z: i32, pub intensity: u16, pub flags: u8, pub return_number: u8, pub number_of_returns: u8, pub scan_direction_flag: bool, pub edge_of_flight_line: bool, pub classification: u8, pub is_synthetic: bool, pub is_key_point: bool, pub is_withheld: bool, pub scan_angle_rank: i8, pub user_data: u8, pub point_source_id: u16, pub legacy_point_type: u8, pub legacy_classification: u8, pub legacy_return_number: u8, pub legacy_number_of_returns: u8, pub legacy_scan_angle_rank: i8, pub scanner_channel: u8, pub class_flag: u8, pub scan_angle: i16, pub gps_time_change: Option<u8>, pub gps_time: Option<f64>, pub rgba: Option<RGBA>, pub wave_packet: Option<WavePacket>, pub nir: Option<u16>,
}
Expand description

A LAS Point Data Record. Compatible with Point Data Record Format 0 to 10

Fields§

§x: i32

X coordinate

§y: i32

Y coordinate

§z: i32

Z coordinate

§intensity: u16

Intensity

§flags: u8

flags

§return_number: u8

Return Number

§number_of_returns: u8

Number of Returns

§scan_direction_flag: bool

Scan Direction Flag

§edge_of_flight_line: bool

Edge of Flight Line

§classification: u8

Classification

§is_synthetic: bool

True if it’s synthetic

§is_key_point: bool

True if it’s key point

§is_withheld: bool

True if it’s withheld

§scan_angle_rank: i8

Overlap

§user_data: u8

User Data

§point_source_id: u16

Point Source ID

§legacy_point_type: u8

Legacy Point Type

§legacy_classification: u8

Legacy Classification

§legacy_return_number: u8

Legacy Return Number

§legacy_number_of_returns: u8

Legacy Number of Returns

§legacy_scan_angle_rank: i8

Legacy Scan Direction Flag

§scanner_channel: u8

Scanner Channel is used to indicate the channel (scanner head) of a multichannel system

§class_flag: u8

Classification flags are used to indicate special characteristics associated with the point.

§scan_angle: i16

The Scan Angle is a signed short that represents the rotational position of the emitted laser pulse with respect to the vertical of the coordinate system of the data. Down in the data coordinate system is the 0.0 position. Each increment represents 0.006 degrees.

§gps_time_change: Option<u8>

GPS Time Change

§gps_time: Option<f64>

GPS Time

§rgba: Option<RGBA>

RGB Color

§wave_packet: Option<WavePacket>

Wave Packet Data

§nir: Option<u16>

NIR: The NIR (near infrared) channel value associated with this point.

Implementations§

Source§

impl LASPoint

Source

pub fn format0<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format0

Source

pub fn format1<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format1

Source

pub fn format2<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format2

Source

pub fn format3<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format3

Source

pub fn format4<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format4

Source

pub fn format5<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format5

Source

pub fn format6<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format6

Source

pub fn format7<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format7

Source

pub fn format8<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format8

Source

pub fn format9<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format9

Source

pub fn format10<T: Reader>(reader: &T, offset: u64) -> Self

Build LAS Point from Format10

Source

pub fn inject_point10<T: Reader>(&mut self, reader: &T, offset: u64)

Inject POINT10

Source

pub fn inject_point14_temp<T: Reader>(&mut self, reader: &T, offset: u64)

Inject temporary POINT14

Source

pub fn inject_point14<T: Reader>( &mut self, reader: &T, offset: u64, compressed: bool, )

Inject POINT14

Source

pub fn set_flags(&mut self, flags: u8, point14: bool)

Set Flags

Source

pub fn set_flags2(&mut self, class: u8)

Set Flags 2

Source

pub fn set_classification(&mut self, class: u8)

Set Flags 2 14

Source

pub fn class_flag(&self) -> ClassFlag

get the class flag as an enum

Source

pub fn class_type(&self, point14: bool) -> LASClassification

class type

Source

pub fn class_type14(&self) -> LASClassification14

class type 14

Source

pub fn set_flags3(&mut self, class: u8)

Set Classification14

Source

pub fn inject_gps_time<T: Reader>(&mut self, reader: &T, offset: u64)

Inject GPSTIME11

Source

pub fn inject_rgb<T: Reader>(&mut self, reader: &T, offset: u64)

Inject RGB12 & RGB14

Source

pub fn inject_nir<T: Reader>(&mut self, reader: &T, offset: u64)

Inject NIR

Source

pub fn inject_rgb_nir<T: Reader>(&mut self, reader: &T, offset: u64)

Inject 8 bytes (2 bytes each for R, G, B, and NIR)

Source

pub fn inject_wave_packet<T: Reader>(&mut self, reader: &T, offset: u64)

Inject WAVEPACKET13 & WAVEPACKET14

Source

pub fn to_vector_point(&self, header: &LASHeader) -> VectorPoint<LASPoint>

To Vector Point

Source

pub fn to_buffer_14(&self, compressed: bool) -> Vec<u8>

To Buffer

Trait Implementations§

Source§

impl Clone for LASPoint

Source§

fn clone(&self) -> LASPoint

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for LASPoint

Source§

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

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

impl Default for LASPoint

Source§

fn default() -> LASPoint

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

impl<'de> Deserialize<'de> for LASPoint

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T: Reader> FeatureReader<(), Map<String, ValueType>, LASPoint> for LASReader<T>

A feature reader trait with a callback-based approach

Source§

type FeatureIterator<'a> = LASIterator<'a, T> where T: 'a

The Feature Reader should implement an iterator of some kind
Source§

fn iter(&self) -> Self::FeatureIterator<'_>

All readers have an iter function that returns a Iterator struct
Source§

fn par_iter( &self, pool_size: usize, thread_id: usize, ) -> Self::FeatureIterator<'_>

All readers have a par_iter function that returns a ParallelIterator struct
Source§

impl<T: Reader + Debug> FeatureReader<(), Map<String, ValueType>, LASPoint> for LAZReader<T>

A feature reader trait with a callback-based approach

Source§

type FeatureIterator<'a> = LAZIterator<'a, T> where T: 'a

The Feature Reader should implement an iterator of some kind
Source§

fn iter(&self) -> Self::FeatureIterator<'_>

All readers have an iter function that returns a Iterator struct
Source§

fn par_iter( &self, pool_size: usize, thread_id: usize, ) -> Self::FeatureIterator<'_>

All readers have a par_iter function that returns a ParallelIterator struct
Source§

impl From<&Map<String, ValueType>> for LASPoint

Starting from a ref to an MValue, convert to a struct

Source§

fn from(m: &MValue) -> Self

Converts to this type from the input type.
Source§

impl From<&ValueType> for LASPoint

If this struct ref is nested into another struct, pull out the MValue and let From handle

Source§

fn from(value: &ValueType) -> Self

Converts to this type from the input type.
Source§

impl From<LASPoint> for MValue

Starting from a struct, convert to an MValue

Source§

fn from(value: LASPoint) -> MValue

Converts to this type from the input type.
Source§

impl From<LASPoint> for ValueType

If this struct is nested into another struct, convert to a ValueType that’s nested

Source§

fn from(value: LASPoint) -> ValueType

Converts to this type from the input type.
Source§

impl From<Map<String, ValueType>> for LASPoint

Starting from an MValue, convert to a struct

Source§

fn from(m: MValue) -> Self

Converts to this type from the input type.
Source§

impl From<ValueType> for LASPoint

If this struct is nested into another struct, pull out the MValue and let From handle

Source§

fn from(value: ValueType) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for LASPoint

Source§

fn eq(&self, other: &LASPoint) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for LASPoint

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl MValueCompatible for LASPoint

Finally implement the MValueCompatible trait

Source§

impl StructuralPartialEq for LASPoint

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

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

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,