Struct esri_ascii_grid::header::EsriASCIIRasterHeader
source · pub struct EsriASCIIRasterHeader<T, U>{
pub ncols: usize,
pub nrows: usize,
pub xll: T,
pub yll: T,
pub yur: T,
pub xur: T,
pub cornertype: CornerType,
pub cellsize: T,
pub nodata_value: Option<U>,
}
Expand description
A reader for ESRI ASCII raster files. This reader reads the header of the file and then reads the data on demand. The data is cached in memory, so that the file is only read once.
§Type Parameters
R
- The type of the file. This should be a file that implementsRead
andSeek
.T
- The type of the coordinates. Should be a number.U
- The type of the height values in the grid. Should be a number
Fields§
§ncols: usize
§nrows: usize
§xll: T
§yll: T
§yur: T
§xur: T
§cornertype: CornerType
§cellsize: T
§nodata_value: Option<U>
Implementations§
source§impl<T, U> EsriASCIIRasterHeader<T, U>
impl<T, U> EsriASCIIRasterHeader<T, U>
pub fn new( ncols: usize, nrows: usize, xll: T, yll: T, cornertype: CornerType, cellsize: T, nodata_value: Option<U> ) -> Self
pub fn num_rows(&self) -> usize
pub fn num_cols(&self) -> usize
pub fn min_x(&self) -> T
pub fn max_x(&self) -> T
pub fn min_y(&self) -> T
pub fn max_y(&self) -> T
pub fn cell_size(&self) -> T
pub fn no_data_value(&self) -> Option<U>
sourcepub fn corner_type(&self) -> CornerType
pub fn corner_type(&self) -> CornerType
ESRI ASCII files can have either a corner or center cell type.
If the cell type is corner, the values are the at coordinates of the bottom left corner of the cell.
If the cell type is center, the values are the at coordinates of the center of the cell.
Trait Implementations§
source§impl<T, U> Clone for EsriASCIIRasterHeader<T, U>
impl<T, U> Clone for EsriASCIIRasterHeader<T, U>
source§fn clone(&self) -> EsriASCIIRasterHeader<T, U>
fn clone(&self) -> EsriASCIIRasterHeader<T, U>
Returns a copy 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 moresource§impl<T, U> Debug for EsriASCIIRasterHeader<T, U>
impl<T, U> Debug for EsriASCIIRasterHeader<T, U>
impl<T, U> Copy for EsriASCIIRasterHeader<T, U>
Auto Trait Implementations§
impl<T, U> Freeze for EsriASCIIRasterHeader<T, U>
impl<T, U> RefUnwindSafe for EsriASCIIRasterHeader<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for EsriASCIIRasterHeader<T, U>
impl<T, U> Sync for EsriASCIIRasterHeader<T, U>
impl<T, U> Unpin for EsriASCIIRasterHeader<T, U>
impl<T, U> UnwindSafe for EsriASCIIRasterHeader<T, U>where
T: UnwindSafe,
U: UnwindSafe,
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