pub struct Point {Show 22 fields
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>,
}Expand description
A three dimensional point.
Fields§
§x: f64The x coordinate, as a float.
y: f64The y coordinate, as a float.
z: f64The z coordinate, as a float.
intensity: u16The 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: u8The pulse return number for a given output pulse.
number_of_returns: u8The total number of returns for a given pulse.
scan_direction: ScanDirectionThe direction at which the scanner mirror was traveling at the time of the output pulse.
is_edge_of_flight_line: boolTrue if the point is at the end of a scan.
classification: ClassificationThe ASPRS classification for this point.
is_synthetic: boolThis point was created by a technique other than LiDAR collection.
is_key_point: boolThe point should be considered a model key-point.
is_withheld: boolThe point should be considered withheld (i.e. it’s deleted).
is_overlap: boolIs this an overlap point?
scanner_channel: u8The channel of the scanner, used only in multi-channel systems.
scan_angle: f32The 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: u8Used at the user’s discretion.
point_source_id: u16The 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§
Source§impl Point
impl Point
Sourcepub fn new(raw_point: Point, transforms: &Vector<Transform>) -> Point
pub fn new(raw_point: Point, transforms: &Vector<Transform>) -> Point
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());Sourcepub fn into_raw(self, transforms: &Vector<Transform>) -> Result<Point>
pub fn into_raw(self, transforms: &Vector<Transform>) -> Result<Point>
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();Sourcepub fn flags(&self) -> Result<Flags>
pub fn flags(&self) -> Result<Flags>
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());Sourcepub fn matches(&self, format: &Format) -> bool
pub fn matches(&self, format: &Format) -> bool
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 StructuralPartialEq for Point
Auto Trait Implementations§
impl Freeze for Point
impl RefUnwindSafe for Point
impl Send for Point
impl Sync for Point
impl Unpin for Point
impl UnwindSafe for Point
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
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