pub struct Template3_30 {Show 16 fields
pub earth_shape: EarthShape,
pub ni: u32,
pub nj: u32,
pub first_point_lat: i32,
pub first_point_lon: i32,
pub resolution_and_component_flags: ResolutionAndComponentFlags,
pub lad: i32,
pub lov: i32,
pub dx: u32,
pub dy: u32,
pub projection_centre: ProjectionCentreFlag,
pub scanning_mode: ScanningMode,
pub latin1: i32,
pub latin2: i32,
pub south_pole_lat: i32,
pub south_pole_lon: i32,
}Expand description
Grid definition template 3.30 - Lambert conformal.
§Examples
use std::io::{BufReader, Read};
use grib::def::grib2::template::{Template3_30, param_set};
use grib_template_helpers::TryFromSlice;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut buf = Vec::new();
let f = std::fs::File::open("testdata/ds.critfireo.bin.xz")?;
let f = BufReader::new(f);
let mut f = xz2::bufread::XzDecoder::new(f);
f.read_to_end(&mut buf)?;
let mut pos = 0x83;
let actual = Template3_30::try_from_slice(&buf, &mut pos)?;
let expected = Template3_30 {
earth_shape: param_set::EarthShape {
shape: 1,
spherical_earth_radius_scale_factor: 0,
spherical_earth_radius_scaled_value: 6371200,
major_axis_scale_factor: 0,
major_axis_scaled_value: 0,
minor_axis_scale_factor: 0,
minor_axis_scaled_value: 0,
},
ni: 2145,
nj: 1377,
first_point_lat: 20190000,
first_point_lon: 238449996,
resolution_and_component_flags: param_set::ResolutionAndComponentFlags(0b00000000),
lad: 25000000,
lov: 265000000,
dx: 2539703,
dy: 2539703,
projection_centre: param_set::ProjectionCentreFlag(0b00000000),
scanning_mode: param_set::ScanningMode(0b01010000),
latin1: 25000000,
latin2: 25000000,
south_pole_lat: -90000000,
south_pole_lon: 0,
};
assert_eq!(actual, expected);
Ok(())
}Fields§
§earth_shape: EarthShape§ni: u32Nx - number of points along the x-axis.
nj: u32Ny - number of points along the y-axis.
first_point_lat: i32La1 - latitude of first grid point.
first_point_lon: i32Lo1 - longitude of first grid point.
resolution_and_component_flags: ResolutionAndComponentFlags§lad: i32LaD - latitude where Dx and Dy are specified.
lov: i32LoV - longitude of meridian parallel to y-axis along which latitude increases as the y-coordinate increases.
dx: u32Dx - x-direction grid length (see Note 1).
dy: u32Dy - y-direction grid length (see Note 1).
projection_centre: ProjectionCentreFlag§scanning_mode: ScanningMode§latin1: i32Latin 1 - first latitude from the pole at which the secant cone cuts the sphere.
latin2: i32Latin 2 - second latitude from the pole at which the secant cone cuts the sphere.
south_pole_lat: i32Latitude of the southern pole of projection.
south_pole_lon: i32Longitude of the southern pole of projection.
Trait Implementations§
Source§impl Debug for Template3_30
impl Debug for Template3_30
Source§impl Dump for Template3_30
impl Dump for Template3_30
Source§impl GridPointIndex for Template3_30
impl GridPointIndex for Template3_30
Source§fn grid_shape(&self) -> (usize, usize)
fn grid_shape(&self) -> (usize, usize)
Returns the shape of the grid, i.e. a tuple of the number of grids in
the i and j directions.
Source§fn scanning_mode(&self) -> &ScanningMode
fn scanning_mode(&self) -> &ScanningMode
Returns
ScanningMode used for the iteration.Source§impl GridShortName for Template3_30
impl GridShortName for Template3_30
Source§fn short_name(&self) -> &'static str
fn short_name(&self) -> &'static str
Returns the grid type. Read more
Source§impl LatLons for Template3_30
Available on crate feature gridpoints-proj only.
impl LatLons for Template3_30
Available on crate feature
gridpoints-proj only.Source§impl PartialEq for Template3_30
impl PartialEq for Template3_30
Source§impl TryFromSlice for Template3_30
impl TryFromSlice for Template3_30
impl Eq for Template3_30
impl StructuralPartialEq for Template3_30
Auto Trait Implementations§
impl Freeze for Template3_30
impl RefUnwindSafe for Template3_30
impl Send for Template3_30
impl Sync for Template3_30
impl Unpin for Template3_30
impl UnsafeUnpin for Template3_30
impl UnwindSafe for Template3_30
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