pub struct LASWriter<T: Write + Seek + Send + 'static> { /* private fields */ }
Expand description
PointWriter
implementation for LAS/LAZ files.
NOTE: Due to the nature of the LAS file format, this file
writer requires manual flush
calls in order to actually write the LAS/LAZ data. Once you are done
writing points, make sure to call flush
so that the LAS header is updated correctly.
Implementations§
Source§impl<T: Write + Seek + Send + 'static> LASWriter<T>
impl<T: Write + Seek + Send + 'static> LASWriter<T>
Sourcepub fn from_writer_and_point_layout(
writer: T,
point_layout: &PointLayout,
is_compressed: bool,
) -> Result<Self>
pub fn from_writer_and_point_layout( writer: T, point_layout: &PointLayout, is_compressed: bool, ) -> Result<Self>
Creates a new LASWriter
from the given writer
. This uses a default-created LAS header for writing,
with an appropriate point format determined from the given point_layout
. The LAS header uses a scale
of 0.001, which yields 1mm precision. LAS version 1.4 is used.
If is_compressed
is set, the writer will write compressed LAZ
files instead of LAS
files.
Sourcepub fn from_writer_and_header(
writer: T,
header: Header,
is_compressed: bool,
) -> Result<Self>
pub fn from_writer_and_header( writer: T, header: Header, is_compressed: bool, ) -> Result<Self>
Creates a new LASWriter
from the given writer and LAS header. If is_compressed
is set,
the writer will write compressed LAZ
files instead of LAS
files.
Sourcepub fn into_inner(self) -> Result<T>
pub fn into_inner(self) -> Result<T>
Unwraps with LASWriter, returning the underlying write type T
. All internal data is flushed before returning
the writer
Source§impl LASWriter<BufWriter<File>>
impl LASWriter<BufWriter<File>>
Sourcepub fn from_path_and_header<P: AsRef<Path>>(
path: P,
header: Header,
) -> Result<Self>
pub fn from_path_and_header<P: AsRef<Path>>( path: P, header: Header, ) -> Result<Self>
Creates a new LASWriter
from the given path and LAS header
Sourcepub fn from_path_and_point_layout<P: AsRef<Path>>(
path: P,
point_layout: &PointLayout,
) -> Result<Self>
pub fn from_path_and_point_layout<P: AsRef<Path>>( path: P, point_layout: &PointLayout, ) -> Result<Self>
Creates a new LASWriter
from the given path
and point_layout
Trait Implementations§
Source§impl<T: Write + Seek + Send + 'static> PointWriter for LASWriter<T>
impl<T: Write + Seek + Send + 'static> PointWriter for LASWriter<T>
Source§fn write<'a, B: BorrowedBuffer<'a>>(&mut self, points: &'a B) -> Result<()>
fn write<'a, B: BorrowedBuffer<'a>>(&mut self, points: &'a B) -> Result<()>
PointBuffer
to the associated PointWriter
.Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
PointWriter
, ensuring that all points are written to their destination and that all required
metadata is written as wellSource§fn get_default_point_layout(&self) -> &PointLayout
fn get_default_point_layout(&self) -> &PointLayout
PointLayout
of the associated PointWriter
Auto Trait Implementations§
impl<T> Freeze for LASWriter<T>where
T: Freeze,
impl<T> !RefUnwindSafe for LASWriter<T>
impl<T> Send for LASWriter<T>
impl<T> !Sync for LASWriter<T>
impl<T> Unpin for LASWriter<T>where
T: Unpin,
impl<T> !UnwindSafe for LASWriter<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
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 moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.