pub struct ImageRaster { /* private fields */ }Expand description
An opened raster image with georeferencing from a world file.
The entire image is decoded into memory on open. Subsequent
read_tile calls slice from the in-memory buffer.
Implementations§
Source§impl ImageRaster
impl ImageRaster
Sourcepub fn open(image_path: impl AsRef<Path>) -> Result<Self>
pub fn open(image_path: impl AsRef<Path>) -> Result<Self>
Open the image at image_path. Looks for a sidecar world file
(.jgw / .pgw / .wld) next to it; errors with
ImageError::MissingWorldFile if none found.
CRS defaults to Crs::Unknown; use Self::open_with_crs to set
one explicitly (world files don’t carry CRS info).
Sourcepub fn open_with_crs(image_path: impl AsRef<Path>, crs: Crs) -> Result<Self>
pub fn open_with_crs(image_path: impl AsRef<Path>, crs: Crs) -> Result<Self>
Same as Self::open but with an explicit CRS — the typical
pattern is the caller specifying it via UI / config.
Trait Implementations§
Source§impl Debug for ImageRaster
impl Debug for ImageRaster
Source§impl RasterLayer for ImageRaster
impl RasterLayer for ImageRaster
Source§fn profile(&self) -> &RasterProfile
fn profile(&self) -> &RasterProfile
Layer structure (dimensions, bands, CRS, tile size, pyramid depth).
Source§fn read_tile(&self, level: u8, x: u32, y: u32) -> CoreResult<RasterTile>
fn read_tile(&self, level: u8, x: u32, y: u32) -> CoreResult<RasterTile>
Read one tile at the requested pyramid level + tile-grid (x, y)
coordinate. Read more
Source§fn pyramid_levels(&self) -> u8
fn pyramid_levels(&self) -> u8
Total number of pyramid levels (≥ 1). Default impl reads from the
profile; readers with dynamic pyramid availability can override.
Auto Trait Implementations§
impl Freeze for ImageRaster
impl RefUnwindSafe for ImageRaster
impl Send for ImageRaster
impl Sync for ImageRaster
impl Unpin for ImageRaster
impl UnsafeUnpin for ImageRaster
impl UnwindSafe for ImageRaster
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> 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