pub struct RasterStack { /* private fields */ }Expand description
Multi-dimensional raster stack
Represents a stack of rasters organized in a 4D array: (time, height, width, bands)
Implementations§
Source§impl RasterStack
impl RasterStack
Sourcepub fn from_timeseries(ts: &TimeSeriesRaster) -> Result<Self>
pub fn from_timeseries(ts: &TimeSeriesRaster) -> Result<Self>
Create raster stack from time series
§Errors
Returns error if time series is empty or data not loaded
Sourcepub fn shape(&self) -> (usize, usize, usize, usize)
pub fn shape(&self) -> (usize, usize, usize, usize)
Get stack shape (time, height, width, bands)
Sourcepub fn metadata(&self) -> &StackMetadata
pub fn metadata(&self) -> &StackMetadata
Get metadata
Sourcepub fn set_nodata(&mut self, nodata: f64)
pub fn set_nodata(&mut self, nodata: f64)
Set nodata value
Sourcepub fn get_band_timeseries(&self, band_index: usize) -> Result<Array3<f64>>
pub fn get_band_timeseries(&self, band_index: usize) -> Result<Array3<f64>>
Extract spatial slice for specific band across all time
§Errors
Returns error if band index is out of bounds
Sourcepub fn get_pixel_timeseries(
&self,
row: usize,
col: usize,
band: usize,
) -> Result<Vec<f64>>
pub fn get_pixel_timeseries( &self, row: usize, col: usize, band: usize, ) -> Result<Vec<f64>>
Extract pixel time series at specific location for specific band
§Errors
Returns error if coordinates are out of bounds
Sourcepub fn concatenate_time(stacks: Vec<Self>) -> Result<Self>
pub fn concatenate_time(stacks: Vec<Self>) -> Result<Self>
Sourcepub fn subset_time(&self, start: usize, end: usize) -> Result<Self>
pub fn subset_time(&self, start: usize, end: usize) -> Result<Self>
Sourcepub fn subset_bands(&self, band_indices: &[usize]) -> Result<Self>
pub fn subset_bands(&self, band_indices: &[usize]) -> Result<Self>
Sourcepub fn apply_temporal<F>(&self, func: F) -> Result<Array3<f64>>
pub fn apply_temporal<F>(&self, func: F) -> Result<Array3<f64>>
Sourcepub fn mean_temporal(&self) -> Result<Array3<f64>>
pub fn mean_temporal(&self) -> Result<Array3<f64>>
Sourcepub fn median_temporal(&self) -> Result<Array3<f64>>
pub fn median_temporal(&self) -> Result<Array3<f64>>
Sourcepub fn std_temporal(&self) -> Result<Array3<f64>>
pub fn std_temporal(&self) -> Result<Array3<f64>>
Sourcepub fn min_temporal(&self) -> Result<Array3<f64>>
pub fn min_temporal(&self) -> Result<Array3<f64>>
Trait Implementations§
Source§impl Clone for RasterStack
impl Clone for RasterStack
Source§fn clone(&self) -> RasterStack
fn clone(&self) -> RasterStack
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 moreAuto Trait Implementations§
impl Freeze for RasterStack
impl RefUnwindSafe for RasterStack
impl Send for RasterStack
impl Sync for RasterStack
impl Unpin for RasterStack
impl UnsafeUnpin for RasterStack
impl UnwindSafe for RasterStack
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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