pub struct RasterTile {
pub data: Vec<f32>,
pub width: usize,
pub height: usize,
pub overlap_top: usize,
pub overlap_right: usize,
pub overlap_bottom: usize,
pub overlap_left: usize,
pub origin_x: usize,
pub origin_y: usize,
pub raster_width: usize,
pub raster_height: usize,
pub tile_index: usize,
}Expand description
A single tile extracted from a raster, optionally padded with an overlap halo.
data is stored row-major (top-left origin) and includes halo pixels if
overlap_pixels > 0. The halo is filled using edge-replication (the value
at the nearest in-bounds pixel is copied).
Fields§
§data: Vec<f32>Pixel data (row-major, f32, single band).
Length == padded_width() * padded_height().
width: usizeCore tile width in pixels (without overlap).
height: usizeCore tile height in pixels (without overlap).
overlap_top: usizeOverlap rows added above the core region.
overlap_right: usizeOverlap columns added to the right of the core region.
overlap_bottom: usizeOverlap rows added below the core region.
overlap_left: usizeOverlap columns added to the left of the core region.
origin_x: usizeX pixel coordinate of the tile’s top-left corner in the full raster (excluding overlap extension, i.e. the origin of the core region).
origin_y: usizeY pixel coordinate of the tile’s top-left corner in the full raster (excluding overlap extension).
raster_width: usizeFull raster width in pixels.
raster_height: usizeFull raster height in pixels.
tile_index: usizeFlat tile index: tile_row * tiles_per_row + tile_col.
Implementations§
Source§impl RasterTile
impl RasterTile
Sourcepub fn padded_width(&self) -> usize
pub fn padded_width(&self) -> usize
Width of data in pixels (core + left halo + right halo).
Sourcepub fn padded_height(&self) -> usize
pub fn padded_height(&self) -> usize
Height of data in pixels (core + top halo + bottom halo).
Sourcepub fn padded_len(&self) -> usize
pub fn padded_len(&self) -> usize
Total number of f32 elements in data.
Trait Implementations§
Source§impl Clone for RasterTile
impl Clone for RasterTile
Source§fn clone(&self) -> RasterTile
fn clone(&self) -> RasterTile
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more