[][src]Struct las::reader::Reader

pub struct Reader { /* fields omitted */ }

Reads LAS data.

Implementations

impl Reader[src]

pub fn new<R: Read + Seek + Send + Debug + 'static>(read: R) -> Result<Reader>[src]

Creates a new reader.

This does not wrap the Read in a BufRead, so if you're concered about performance you should do that wrapping yourself (or use from_path).

Examples

use std::io::BufReader;
use std::fs::File;
let file = File::open("tests/data/autzen.las").unwrap();
let reader = Reader::new(BufReader::new(file)).unwrap();

impl Reader[src]

pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Reader>[src]

Creates a new reader from a path.

The underlying File is wrapped in a BufReader for performance reasons.

Examples

let reader = Reader::from_path("tests/data/autzen.las").unwrap();

Trait Implementations

impl Debug for Reader[src]

impl Read for Reader[src]

fn header(&self) -> &Header[src]

Returns a reference to this reader's header.

fn read(&mut self) -> Option<Result<Point>>[src]

Reads a point.

fn seek(&mut self, position: u64) -> Result<()>[src]

Seeks to the given point number, zero-indexed.

fn points(&mut self) -> PointIterator<'_>

Notable traits for PointIterator<'a>

impl<'a> Iterator for PointIterator<'a> type Item = Result<Point>;
[src]

Returns an iterator over this reader's points.

Auto Trait Implementations

impl !RefUnwindSafe for Reader

impl Send for Reader

impl !Sync for Reader

impl Unpin for Reader

impl !UnwindSafe for Reader

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