pub struct TiffExtractorStrategy<'a> { /* private fields */ }Expand description
TIFF format extractor implementation
This strategy handles extraction from TIFF files, including support for tiled and stripped data organizations, and preserves GeoTIFF metadata.
Implementations§
Trait Implementations§
Source§impl<'a> ExtractorStrategy for TiffExtractorStrategy<'a>
impl<'a> ExtractorStrategy for TiffExtractorStrategy<'a>
Source§fn extract_to_file(
&mut self,
tiff_path: &str,
output_path: &str,
region: Option<Region>,
shape: Option<&str>,
) -> TiffResult<()>
fn extract_to_file( &mut self, tiff_path: &str, output_path: &str, region: Option<Region>, shape: Option<&str>, ) -> TiffResult<()>
Extract an image from a TIFF file to another file
This implementation preserves GeoTIFF metadata and handles both tiled and stripped data organizations.
§Arguments
tiff_path- Path to the source TIFF fileoutput_path- Path where the extracted image should be savedregion- Optional region to extract (if None, extracts the entire image)
§Returns
Result indicating success or an error with details
Source§fn extract_image(
&mut self,
tiff_path: &str,
region: Option<Region>,
) -> TiffResult<DynamicImage>
fn extract_image( &mut self, tiff_path: &str, region: Option<Region>, ) -> TiffResult<DynamicImage>
Source§fn extract_to_array(
&mut self,
source_path: &str,
output_path: &str,
format: &str,
region: Option<Region>,
) -> TiffResult<()>
fn extract_to_array( &mut self, source_path: &str, output_path: &str, format: &str, region: Option<Region>, ) -> TiffResult<()>
Extract array data from a file to another file
§Arguments
source_path- Path to the source TIFF fileoutput_path- Path where the extracted array should be savedformat- Format for the output (e.g., “csv”, “json”, “npy”)region- Optional region to extract (if None, extracts the entire image)
§Returns
Result indicating success or an error with details
Source§fn extract_array_data(
&mut self,
source_path: &str,
region: Option<Region>,
) -> TiffResult<ArrayData>
fn extract_array_data( &mut self, source_path: &str, region: Option<Region>, ) -> TiffResult<ArrayData>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for TiffExtractorStrategy<'a>
impl<'a> !UnwindSafe for TiffExtractorStrategy<'a>
impl<'a> Freeze for TiffExtractorStrategy<'a>
impl<'a> Send for TiffExtractorStrategy<'a>
impl<'a> Sync for TiffExtractorStrategy<'a>
impl<'a> Unpin for TiffExtractorStrategy<'a>
impl<'a> UnsafeUnpin for TiffExtractorStrategy<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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