pub struct BasicRasterInfo {
pub geo_transform: [f64; 6],
pub size: (usize, usize),
pub epsg_code: u32,
pub no_data: Option<f64>,
pub n_bands: usize,
}Expand description
Basic metadata extracted from a single GDAL dataset open.
Consolidates the 6 separate Dataset::open calls in builder.rs
(get_resolution, get_geotransform, get_extent, get_epsg_code,
get_na_value, get_image_size) into a single dataset open.
Fields§
§geo_transform: [f64; 6]GeoTransform (x_ul, x_res, x_rot, y_ul, y_rot, y_res)
size: (usize, usize)Image size in pixels (cols, rows)
epsg_code: u32EPSG code (0 if unknown)
no_data: Option<f64>No-data value (None if not set)
n_bands: usizeNumber of raster bands
Implementations§
Source§impl BasicRasterInfo
impl BasicRasterInfo
Sourcepub fn resolution(&self) -> ImageResolution
pub fn resolution(&self) -> ImageResolution
Resolution (x, y) derived from geo_transform.
Sourcepub fn geo_transform_struct(&self) -> GeoTransform
pub fn geo_transform_struct(&self) -> GeoTransform
GeoTransform struct derived from geo_transform array.
Sourcepub fn image_size(&self) -> ImageSize
pub fn image_size(&self) -> ImageSize
ImageSize struct derived from size tuple.
Sourcepub fn na_value<T: RasterType>(&self) -> T
pub fn na_value<T: RasterType>(&self) -> T
No-data value cast to type T, or T::zero() if not set.
Trait Implementations§
Source§impl Clone for BasicRasterInfo
impl Clone for BasicRasterInfo
Source§fn clone(&self) -> BasicRasterInfo
fn clone(&self) -> BasicRasterInfo
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 BasicRasterInfo
impl RefUnwindSafe for BasicRasterInfo
impl Send for BasicRasterInfo
impl Sync for BasicRasterInfo
impl Unpin for BasicRasterInfo
impl UnwindSafe for BasicRasterInfo
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