pub struct Dataset { /* private fields */ }encoder only.Expand description
An open GDAL dataset. Not Sync: GDAL dataset handles must not be shared
between threads, so each worker opens its own.
Implementations§
Source§impl Dataset
impl Dataset
Sourcepub fn open(name: &Path) -> Result<Self>
pub fn open(name: &Path) -> Result<Self>
Open a dataset read-only. name is a GDAL connection string, not
necessarily a filesystem path — the observation path passes
NETCDF:"file.nc":cref.
pub fn size(&self) -> (usize, usize)
pub fn band_count(&self) -> usize
Sourcepub fn geo_transform(&self) -> Result<[f64; 6]>
pub fn geo_transform(&self) -> Result<[f64; 6]>
The geotransform as gdalinfo -json reports it (as_gdalinfo_json),
not the doubles GDAL holds: the reference encoder reads its grid out
of that text, and this is what both the native grid and the wheel’s
gdal_info (info_json) are built from.
Sourcepub fn projection_wkt(&self) -> String
pub fn projection_wkt(&self) -> String
The dataset’s coordinate system as WKT2, the text gdalinfo -json
prints under coordinateSystem.wkt (the same export options:
FORMAT=WKT2, multi-line); empty when the dataset declares none.
A projected source (HRRR’s Lambert conformal grid) is recognised
from it (reproject::lambert_conformal_from_wkt).
Sourcepub fn metadata(&self, domain: &str) -> HashMap<String, String>
pub fn metadata(&self, domain: &str) -> HashMap<String, String>
Dataset-level metadata of one domain ("" is the default domain).
pub fn band_info(&self, number: usize) -> Result<BandInfo>
pub fn bands(&self) -> Result<Vec<BandInfo>>
Trait Implementations§
Auto Trait Implementations§
impl !Sync for Dataset
impl Forget for Dataset
impl Freeze for Dataset
impl Move for Dataset
impl RefUnwindSafe for Dataset
impl Unpin for Dataset
impl UnsafeUnpin for Dataset
impl UnwindSafe for Dataset
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