pub struct GeoTiffFile { /* private fields */ }Expand description
A GeoTIFF file handle with geospatial metadata.
Implementations§
Source§impl GeoTiffFile
impl GeoTiffFile
Sourcepub fn open_with_options<P: AsRef<Path>>(
path: P,
options: GeoTiffOpenOptions,
) -> Result<Self>
pub fn open_with_options<P: AsRef<Path>>( path: P, options: GeoTiffOpenOptions, ) -> Result<Self>
Open a GeoTIFF file from disk with explicit TIFF decoder options.
Sourcepub fn from_bytes(data: Vec<u8>) -> Result<Self>
pub fn from_bytes(data: Vec<u8>) -> Result<Self>
Open a GeoTIFF from an owned byte buffer.
Sourcepub fn from_bytes_with_options(
data: Vec<u8>,
options: GeoTiffOpenOptions,
) -> Result<Self>
pub fn from_bytes_with_options( data: Vec<u8>, options: GeoTiffOpenOptions, ) -> Result<Self>
Open a GeoTIFF from bytes with explicit TIFF decoder options.
Sourcepub fn metadata(&self) -> &GeoMetadata
pub fn metadata(&self) -> &GeoMetadata
Returns the parsed GeoTIFF metadata.
Sourcepub fn epsg(&self) -> Option<u32>
pub fn epsg(&self) -> Option<u32>
Returns the EPSG code of the coordinate reference system, if present.
Sourcepub fn geokeys(&self) -> &GeoKeyDirectory
pub fn geokeys(&self) -> &GeoKeyDirectory
Returns the parsed GeoKey directory.
Sourcepub fn transform(&self) -> Option<&GeoTransform>
pub fn transform(&self) -> Option<&GeoTransform>
Returns the affine transform, if present.
Sourcepub fn geo_bounds(&self) -> Option<[f64; 4]>
pub fn geo_bounds(&self) -> Option<[f64; 4]>
Returns the geographic bounds as (min_x, min_y, max_x, max_y).
Sourcepub fn pixel_to_geo(&self, col: f64, row: f64) -> Option<(f64, f64)>
pub fn pixel_to_geo(&self, col: f64, row: f64) -> Option<(f64, f64)>
Convert a pixel coordinate to map coordinates.
Sourcepub fn geo_to_pixel(&self, x: f64, y: f64) -> Option<(f64, f64)>
pub fn geo_to_pixel(&self, x: f64, y: f64) -> Option<(f64, f64)>
Convert map coordinates to pixel coordinates.
Sourcepub fn band_count(&self) -> u32
pub fn band_count(&self) -> u32
Returns the number of bands.
Sourcepub fn overview_count(&self) -> usize
pub fn overview_count(&self) -> usize
Returns the number of internal overview IFDs.
Sourcepub fn overview_ifd_index(&self, overview_index: usize) -> Result<usize>
pub fn overview_ifd_index(&self, overview_index: usize) -> Result<usize>
Returns the TIFF IFD index of the requested overview.
Sourcepub fn read_raster<T: TiffSample>(&self) -> Result<ArrayD<T>>
pub fn read_raster<T: TiffSample>(&self) -> Result<ArrayD<T>>
Decode the base-resolution raster into a typed ndarray.
Sourcepub fn read_window<T: TiffSample>(
&self,
row_off: usize,
col_off: usize,
rows: usize,
cols: usize,
) -> Result<ArrayD<T>>
pub fn read_window<T: TiffSample>( &self, row_off: usize, col_off: usize, rows: usize, cols: usize, ) -> Result<ArrayD<T>>
Decode a base-resolution pixel window into a typed ndarray.
Sourcepub fn read_overview<T: TiffSample>(
&self,
overview_index: usize,
) -> Result<ArrayD<T>>
pub fn read_overview<T: TiffSample>( &self, overview_index: usize, ) -> Result<ArrayD<T>>
Decode an overview raster into a typed ndarray.
Sourcepub fn read_overview_window<T: TiffSample>(
&self,
overview_index: usize,
row_off: usize,
col_off: usize,
rows: usize,
cols: usize,
) -> Result<ArrayD<T>>
pub fn read_overview_window<T: TiffSample>( &self, overview_index: usize, row_off: usize, col_off: usize, rows: usize, cols: usize, ) -> Result<ArrayD<T>>
Decode an overview pixel window into a typed ndarray.
Auto Trait Implementations§
impl Freeze for GeoTiffFile
impl !RefUnwindSafe for GeoTiffFile
impl Send for GeoTiffFile
impl Sync for GeoTiffFile
impl Unpin for GeoTiffFile
impl UnsafeUnpin for GeoTiffFile
impl !UnwindSafe for GeoTiffFile
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
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>
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>
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