pub struct CopcStreamingReader<S: ByteSource> { /* private fields */ }Expand description
Async streaming COPC reader.
open() reads the LAS header, VLRs, and root hierarchy page.
Deeper hierarchy pages and point chunks are loaded on demand.
Implementations§
Source§impl<S: ByteSource> CopcStreamingReader<S>
impl<S: ByteSource> CopcStreamingReader<S>
Sourcepub fn header(&self) -> &CopcHeader
pub fn header(&self) -> &CopcHeader
The parsed COPC file header.
Sourcepub fn evlr_offset(&self) -> u64
pub fn evlr_offset(&self) -> u64
File offset where EVLRs start.
Sourcepub fn evlr_count(&self) -> u32
pub fn evlr_count(&self) -> u32
Number of EVLRs in the file.
Sourcepub fn get(&self, key: &VoxelKey) -> Option<&HierarchyEntry>
pub fn get(&self, key: &VoxelKey) -> Option<&HierarchyEntry>
Look up a hierarchy entry by voxel key.
Sourcepub fn entries(&self) -> impl Iterator<Item = (&VoxelKey, &HierarchyEntry)>
pub fn entries(&self) -> impl Iterator<Item = (&VoxelKey, &HierarchyEntry)>
Iterate all loaded hierarchy entries.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Number of loaded hierarchy entries.
Sourcepub fn has_pending_pages(&self) -> bool
pub fn has_pending_pages(&self) -> bool
Whether there are hierarchy pages that haven’t been loaded yet.
Sourcepub async fn load_pending_pages(&mut self) -> Result<(), CopcError>
pub async fn load_pending_pages(&mut self) -> Result<(), CopcError>
Load the next batch of pending hierarchy pages.
Sourcepub async fn load_all_hierarchy(&mut self) -> Result<(), CopcError>
pub async fn load_all_hierarchy(&mut self) -> Result<(), CopcError>
Load all remaining hierarchy pages.
Sourcepub async fn fetch_chunk(
&self,
key: &VoxelKey,
) -> Result<DecompressedChunk, CopcError>
pub async fn fetch_chunk( &self, key: &VoxelKey, ) -> Result<DecompressedChunk, CopcError>
Fetch and decompress a single point chunk.
Sourcepub fn read_points(
&self,
chunk: &DecompressedChunk,
) -> Result<Vec<Point>, CopcError>
pub fn read_points( &self, chunk: &DecompressedChunk, ) -> Result<Vec<Point>, CopcError>
Parse points from a decompressed chunk.
Auto Trait Implementations§
impl<S> Freeze for CopcStreamingReader<S>where
S: Freeze,
impl<S> RefUnwindSafe for CopcStreamingReader<S>where
S: RefUnwindSafe,
impl<S> Send for CopcStreamingReader<S>where
S: Send,
impl<S> Sync for CopcStreamingReader<S>where
S: Sync,
impl<S> Unpin for CopcStreamingReader<S>where
S: Unpin,
impl<S> UnsafeUnpin for CopcStreamingReader<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for CopcStreamingReader<S>where
S: UnwindSafe,
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
Mutably borrows from an owned value. Read more