EquatorialTemplate

Struct EquatorialTemplate 

Source
pub struct EquatorialTemplate {
Show 20 fields pub shape: Grib2Table3_2, pub radius_scale_factor: u8, pub radius_scale_value: u32, pub major_axis_scale_factor: u8, pub major_axis_scale_value: u32, pub minor_axis_scale_factor: u8, pub minor_axis_scale_value: u32, pub nx: u32, pub ny: u32, pub basic_angle: f64, pub subdivisions: f64, pub lat1: f64, pub lon1: f64, pub resolution: Grib2Table3_3, pub lat2: f64, pub lon2: f64, pub dx: f64, pub dy: f64, pub scan_mode: Grib2Table3_4, pub grid_units: Grib2GridUnits,
}
Expand description

§GRIB2 - GRID DEFINITION TEMPLATE 3.0

§Latitude/Longitude (or equidistant cylindrical, or Plate Carree)

§Notes

  • Basic angle of the initial production domain and subdivisions of this basic angle are provided to manage cases where the recommended unit of 10-6 degrees is not applicable to describe the extreme longitudes and latitudes, and direction increments. For these last six descriptors, the unit is equal to the ratio of the basic angle and the subdivisions number. For ordinary cases, zero and missing values should be coded, equivalent to respective values of 1 and 106 (10-6 degrees unit).

  • For data on a quasi-regular grid, in which all the rows or columns do not necessarily have the same number of grid points either Ni (octets 31-34) of Nj (octets 35-38) and the corresponding Di (octets 64-67) or Dj (octets 68-71) shall be coded with all bits set to 1 (missing). The actual number of points along each parallel or meridian shall be coded in the octets immediately following the grid definition template (octets [xx+1]-nn), as described in the description of the grid definition section.

  • A quasi-regular grid is only defined for appropriate grid scanning modes. Either rows or columns, but not both simultaneously, may have variable numbers of points or variable spacing. The first point in each row (column) shall be positioned at the meridian (parallel) indicted by octets 47-54. The grid points shall be evenly spaced in latitude (longitude).

A scale value of radius of spherical Earth, or major axis of oblate spheroid Earth is delivered from applying appropriate scale factor to the value expressed in meters.

  • It is recommended to use unsigned direction increments.

  • In most cases, multiplying Ni (octets 31-34) by Nj (octets 35-38) yields the total number of points in the grid. However, this may not be true if bit 8 of the scanning mode flags (octet 72) is set to 1.

Fields§

§shape: Grib2Table3_2

Shape of Earth Table 3.2

§radius_scale_factor: u8

Scale Factor of radius of spherical Earth

§radius_scale_value: u32

Scale value of radius of spherical Earth

§major_axis_scale_factor: u8

Scale factor of major axis of oblate spheroid Earth

§major_axis_scale_value: u32

Scale value of major axis of oblate spheroid Earth

§minor_axis_scale_factor: u8

Scale factor of minor axis of oblate spheroid Earth

§minor_axis_scale_value: u32

Scale value of minor axis of oblate spheroid Earth

§nx: u32

Number of points along a parallel (W-E)

§ny: u32

Number of points along a meridian (N-S)

§basic_angle: f64

Basic angle of the initial production domain

§subdivisions: f64

Subdivisions of basic angle used to define extreme longitudes and latitudes, and direction increments

§lat1: f64

Latitude of first grid point

§lon1: f64

Longitude of first grid point

§resolution: Grib2Table3_3

Resolution and component flags Table 3.3

§lat2: f64

Latitude of last grid point

§lon2: f64

Longitude of last grid point

§dx: f64

i direction increment

§dy: f64

j direction increment

§scan_mode: Grib2Table3_4

Scanning mode Table 3.4

§grid_units: Grib2GridUnits

Grid Units

Implementations§

Source§

impl EquatorialTemplate

Source

pub fn new<T: Reader>(section: &T) -> Self

Create a new instance of EquatorialTemplate

§Parameters
  • section: byte block for template 3.0
§Returns

The parsed template

Source

pub fn build_grid(&mut self) -> VectorMultiPoint

Convert this section into grid data

Trait Implementations§

Source§

impl Clone for EquatorialTemplate

Source§

fn clone(&self) -> EquatorialTemplate

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EquatorialTemplate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for EquatorialTemplate

Source§

fn eq(&self, other: &EquatorialTemplate) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for EquatorialTemplate

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V