Struct las::Writer
[−]
[src]
pub struct Writer<W: Seek + Write> { // some fields omitted }
Write LAS points to a Write
.
This struct implements Drop
, so the LAS data are finalized (the header is re-written) when
the Writer
goes out of scope. This will panic if there is an error while closing the file, so
if you're worried about panics you will need to use Writer::close
instead.
Methods
impl<W: Seek + Write> Writer<W>
[src]
fn default(write: W) -> Result<Writer<W>>
Creates a new default writer.
Examples
use std::io::Cursor; let writer = Writer::default(Cursor::new(Vec::new())).unwrap();
fn write(&mut self, point: Point) -> Result<()>
Writes a point.
Examples
use std::io::Cursor; let mut writer = Writer::default(Cursor::new(Vec::new())).unwrap(); writer.write(Default::default()).unwrap();
fn close(&mut self) -> Result<()>
Closes this writer.
After the writer is closed, and future calls to write
will error.
Examples
use std::io::Cursor; let mut writer = Writer::default(Cursor::new(Vec::new())).unwrap(); assert!(writer.write(Default::default()).is_ok()); writer.close().unwrap(); assert!(writer.write(Default::default()).is_err());