pub struct RasterBlock<U>where
U: RasterType,{
pub block_index: usize,
pub read_window: ReadWindow,
pub overlap_size: usize,
pub geo_transform: GeoTransform,
pub overlap: Overlap,
pub shape: RasterDataShape,
pub epsg_code: usize,
pub raster_metadata: RasterMetadata<U>,
}Expand description
A block representing a partition of a raster dataset for parallel processing.
Fields§
§block_index: usizeIndex of this block in the dataset
read_window: ReadWindowWindow describing which portion of the dataset this block covers
overlap_size: usizeSize of overlap with neighboring blocks
geo_transform: GeoTransformGeographic transformation parameters
overlap: OverlapOverlap data with neighboring blocks
shape: RasterDataShapeShape of the raster data
epsg_code: usizeEPSG coordinate reference system code
raster_metadata: RasterMetadata<U>Full raster metadata
Implementations§
Source§impl<U> RasterBlock<U>where
U: RasterType,
impl<U> RasterBlock<U>where
U: RasterType,
Sourcepub fn into_frc(&self, data: &Array2<U>) -> Array3<U>
pub fn into_frc(&self, data: &Array2<U>) -> Array3<U>
Converts a 2D array into a 3D feature array.
Sourcepub fn write_samples_feature<T>(
&self,
data: &Array2<T>,
file_name: &PathBuf,
na: T,
)where
T: RasterType,
pub fn write_samples_feature<T>(
&self,
data: &Array2<T>,
file_name: &PathBuf,
na: T,
)where
T: RasterType,
Writes sample data to a vector file.
Sourcepub fn write3<T>(&self, data: Array3<T>, out_fn: &PathBuf)where
T: RasterType,
pub fn write3<T>(&self, data: Array3<T>, out_fn: &PathBuf)where
T: RasterType,
Writes 3D data to a file.
Sourcepub fn write_time_step_blocks<T>(
&self,
data: &Array4<T>,
tmp_file: &Path,
file_stem: &str,
bid: usize,
) -> Vec<PathBuf>where
T: RasterType,
pub fn write_time_step_blocks<T>(
&self,
data: &Array4<T>,
tmp_file: &Path,
file_stem: &str,
bid: usize,
) -> Vec<PathBuf>where
T: RasterType,
Writes each time step (axis 0) of a 4D array as a separate block file.
Replaces the duplicated loop pattern found in apply(), apply_with_mask()
and mosaic() in processing.rs.
Trait Implementations§
Source§impl<U> Clone for RasterBlock<U>where
U: RasterType + Clone,
impl<U> Clone for RasterBlock<U>where
U: RasterType + Clone,
Source§fn clone(&self) -> RasterBlock<U>
fn clone(&self) -> RasterBlock<U>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<U> Debug for RasterBlock<U>where
U: RasterType + Debug,
impl<U> Debug for RasterBlock<U>where
U: RasterType + Debug,
Source§impl<U> PartialEq for RasterBlock<U>where
U: RasterType + PartialEq,
impl<U> PartialEq for RasterBlock<U>where
U: RasterType + PartialEq,
impl<U> StructuralPartialEq for RasterBlock<U>where
U: RasterType,
Auto Trait Implementations§
impl<U> Freeze for RasterBlock<U>where
U: Freeze,
impl<U> RefUnwindSafe for RasterBlock<U>where
U: RefUnwindSafe,
impl<U> Send for RasterBlock<U>
impl<U> Sync for RasterBlock<U>
impl<U> Unpin for RasterBlock<U>where
U: Unpin,
impl<U> UnwindSafe for RasterBlock<U>where
U: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 more