Struct e57::E57Reader

source ·
pub struct E57Reader<T: Read + Seek> { /* private fields */ }
Expand description

Main interface for reading E57 files.

Implementations§

source§

impl<T: Read + Seek> E57Reader<T>

source

pub fn new(reader: T) -> Result<Self>

Creates a new E57 instance for from a reader.

source

pub fn header(&self) -> Header

Returns the contents of E57 binary file header structure.

source

pub fn xml(&self) -> &str

Returns the XML section of the E57 file.

source

pub fn format_name(&self) -> &str

Returns format name stored in the XML section.

source

pub fn guid(&self) -> &str

Returns GUID stored in the XML section.

source

pub fn library_version(&self) -> Option<&str>

Returns the library version string of the root XML section.

source

pub fn extensions(&self) -> Vec<Extension>

Returns a list of all extensions defined in this file.

source

pub fn pointclouds(&self) -> Vec<PointCloud>

Returns a list of all point cloud descriptors in the file.

source

pub fn pointcloud_simple( &mut self, pc: &PointCloud, ) -> Result<PointCloudReaderSimple<'_, T>>

Returns an iterator for reading point cloud data. The data provided by this interface is already normalized for convenience. There is also a raw iterator for advanced use-cases that require direct access.

source

pub fn pointcloud_raw( &mut self, pc: &PointCloud, ) -> Result<PointCloudReaderRaw<'_, T>>

Returns an iterator for reading raw low level point cloud data. This provides access to the original values stored in the E57 file. This interface is only recommended for advanced use-cases. In most scenarios the simple iterator is the better choice.

source

pub fn images(&self) -> Vec<Image>

Returns a list of all image descriptors in the file.

source

pub fn blob(&mut self, blob: &Blob, writer: &mut dyn Write) -> Result<u64>

Reads the content of a blob and copies it into the supplied writer. Returns the number of written bytes.

source

pub fn creation(&self) -> Option<DateTime>

Returns the optional creation date and time of the file.

source

pub fn coordinate_metadata(&self) -> Option<&str>

Returns the optional coordinate system metadata of the file.

This should contain a Coordinate Reference System that is specified by a string in a well-known text format for a spatial reference system, as defined by the Coordinate Transformation Service specification developed by the Open Geospatial Consortium. See also: https://www.ogc.org/standard/wkt-crs/

source

pub fn validate_crc(reader: T) -> Result<u64>

Iterate over an reader to check an E57 file for CRC errors.

This standalone function does only the minimal parsing required to get the E57 page size and without any other checks or validation. After that it will CRC-validate the whole file. It will not read or check any other file header and XML data! This method returns the page size of the E57 file.

source

pub fn raw_xml(reader: T) -> Result<Vec<u8>>

Returns the raw unparsed binary XML data of the E57 file as bytes.

This standalone function does only the minimal parsing required to get the XML section without any other checks or any other validation than basic CRC ckecking for the XML section itself.

source§

impl E57Reader<BufReader<File>>

source

pub fn from_file(path: impl AsRef<Path>) -> Result<Self>

Creates an E57 instance from a Path.

Auto Trait Implementations§

§

impl<T> Freeze for E57Reader<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for E57Reader<T>
where T: RefUnwindSafe,

§

impl<T> Send for E57Reader<T>
where T: Send,

§

impl<T> Sync for E57Reader<T>
where T: Sync,

§

impl<T> Unpin for E57Reader<T>
where T: Unpin,

§

impl<T> UnwindSafe for E57Reader<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.