#[non_exhaustive]pub struct RasterInfo {Show 15 fields
pub width: u32,
pub height: u32,
pub corner_longitude_deg: f64,
pub corner_latitude_deg: f64,
pub pixel_longitude_deg: f64,
pub pixel_latitude_deg: f64,
pub raster_type: RasterType,
pub geographic_crs_epsg: u16,
pub vertical_crs_epsg: Option<u16>,
pub vertical_unit: VerticalUnit,
pub vertical_unit_stated: bool,
pub scale: f64,
pub offset: f64,
pub sample: SampleType,
pub nodata: Option<f64>,
}Expand description
What an elevation file says about itself.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.width: u32Columns.
height: u32Rows.
corner_longitude_deg: f64Longitude of the outer corner of pixel (0, 0) (its west edge when Δλ > 0), degrees.
corner_latitude_deg: f64Latitude of the outer corner of pixel (0, 0) (its north edge when Δφ < 0), degrees.
pixel_longitude_deg: f64Δλ: longitude change from one column to the next, degrees.
pixel_latitude_deg: f64Δφ: latitude change from one row to the next, degrees; negative when north is up.
raster_type: RasterTypeWhat the file’s tiepoint names; already applied to the corner above.
geographic_crs_epsg: u16The geographic CRS’s EPSG code, one of NEAR_WGS84.
vertical_crs_epsg: Option<u16>The vertical CRS’s EPSG code, if the file names one (a user-defined or private code, 32767 and above, is not one).
vertical_unit: VerticalUnitThe unit pixel values are in, after the scale and offset.
vertical_unit_stated: boolWhether the file states that unit (by VerticalUnitsGeoKey, a vertical CRS this reader
knows, or a unit type in GDAL’s GDAL_METADATA); false means meters were assumed.
scale: f64The pixels’ scale: a raw value v stands for v·scale + offset in the vertical unit.
offset: f64The pixels’ offset, in the vertical unit.
sample: SampleTypeThe pixels’ sample type.
nodata: Option<f64>The nodata value, rounded to the sample type, if the file has one a sample can hold.
Implementations§
Source§impl RasterInfo
impl RasterInfo
Sourcepub fn pixel_of(&self, latitude_deg: f64, longitude_deg: f64) -> Option<Pixel>
pub fn pixel_of(&self, latitude_deg: f64, longitude_deg: f64) -> Option<Pixel>
The pixel holding a point, by the module’s rule, or None if the point is off the
raster. The longitude is tried as given and then 360° to either side, so a file on 0° to
360° reads a longitude given on −180° to 180°.
Trait Implementations§
Source§impl Clone for RasterInfo
impl Clone for RasterInfo
Source§fn clone(&self) -> RasterInfo
fn clone(&self) -> RasterInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RasterInfo
impl Debug for RasterInfo
Source§impl<'de> Deserialize<'de> for RasterInfo
impl<'de> Deserialize<'de> for RasterInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for RasterInfo
impl PartialEq for RasterInfo
Source§fn eq(&self, other: &RasterInfo) -> bool
fn eq(&self, other: &RasterInfo) -> bool
self and other values to be equal, and is used by ==.