Struct las::point::Point[][src]

pub struct Point {
    pub x: f64,
    pub y: f64,
    pub z: f64,
    pub intensity: u16,
    pub return_number: u8,
    pub number_of_returns: u8,
    pub scan_direction: ScanDirection,
    pub is_edge_of_flight_line: bool,
    pub classification: Classification,
    pub is_synthetic: bool,
    pub is_key_point: bool,
    pub is_withheld: bool,
    pub is_overlap: bool,
    pub scanner_channel: u8,
    pub scan_angle: f32,
    pub user_data: u8,
    pub point_source_id: u16,
    pub gps_time: Option<f64>,
    pub color: Option<Color>,
    pub waveform: Option<Waveform>,
    pub nir: Option<u16>,
    pub extra_bytes: Vec<u8>,
}

A three dimensional point.

Fields

x: f64

The x coordinate, as a float.

y: f64

The y coordinate, as a float.

z: f64

The z coordinate, as a float.

intensity: u16

The integer representation of the pulse return magnitude.

This value is optional and system specific, but should be included when available. Because there is no way to indicate the "optionalness" of the intensity value and since zero could be valid intensity, we don't wrap this in an Option.

return_number: u8

The pulse return number for a given output pulse.

number_of_returns: u8

The total number of returns for a given pulse.

scan_direction: ScanDirection

The direction at which the scanner mirror was traveling at the time of the output pulse.

is_edge_of_flight_line: bool

True if the point is at the end of a scan.

classification: Classification

The ASPRS classification for this point.

is_synthetic: bool

This point was created by a technique other than LiDAR collection.

is_key_point: bool

The point should be considered a model key-point.

is_withheld: bool

The point should be considered withheld (i.e. it's deleted).

is_overlap: bool

Is this an overlap point?

scanner_channel: u8

The channel of the scanner, used only in multi-channel systems.

scan_angle: f32

The angle of the output of the laser pulse.

This is supposed to include the roll of the aircraft, if applicable. Zero degrees is nadir, -90° is to the left.

user_data: u8

Used at the user's discretion.

point_source_id: u16

The file from which this point originated.

This number corresponds to a file source ID.

gps_time: Option<f64>

The time at which the point was acquired.

color: Option<Color>

This point's color.

waveform: Option<Waveform>

This point's waveform information.

nir: Option<u16>

This point's near infrared value.

extra_bytes: Vec<u8>

This point's extra bytes.

These can have structure and meaning, but for now they don't.

Implementations

impl Point[src]

pub fn new(mut raw_point: Point, transforms: &Vector<Transform>) -> Point[src]

Creates a point from a raw point.

Examples

use las::Point;
use las::raw;
let raw_point = raw::Point::default();
let point = Point::new(raw_point, &Default::default());

pub fn into_raw(self, transforms: &Vector<Transform>) -> Result<Point>[src]

Creates a raw las point from this point.

Examples

use las::Point;
let point = Point::default();
let raw_point = point.into_raw(&Default::default()).unwrap();

pub fn flags(&self) -> Result<Flags>[src]

Creates the flags bytes for use in a raw point.

Examples

use las::Point;
let point = Point { return_number: 1, ..Default::default() };
assert_eq!((1, 0, 0), point.flags().unwrap().into());

pub fn matches(&self, format: &Format) -> bool[src]

Returns true if this point matches the point format.

"Matches" means that the set of optional attributes is exactly the same.

Examples

use las::point::Format;
use las::Point;

let mut format = Format::new(0).unwrap();
let mut point = Point::default();
assert!(point.matches(&format));

format.has_gps_time = true;
assert!(!point.matches(&format));

point.gps_time = Some(42.);
assert!(point.matches(&format));

Trait Implementations

impl Clone for Point[src]

impl Debug for Point[src]

impl Default for Point[src]

impl PartialEq<Point> for Point[src]

impl StructuralPartialEq for Point[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.