Struct stac::Band

source ·
pub struct Band {
    pub name: Option<String>,
    pub description: Option<String>,
    pub nodata: Option<f64>,
    pub data_type: Option<DataType>,
    pub statistics: Option<Statistics>,
    pub unit: Option<String>,
    pub additional_fields: Map<String, Value>,
}
Expand description

Bands are used to describe the available bands in a STAC entity or Asset.

A band describes the general construct of a band or layer, which doesn’t necessarily need to be a spectral band. By adding fields from extensions you can indicate that a band, for example, is

  • a spectral band (EO extension),
  • a band with classification results (classification extension),
  • a band with quality information such as cloud cover probabilities,

etc.

Fields§

§name: Option<String>

The name of the band (e.g., “B01”, “B8”, “band2”, “red”), which should be unique across all bands defined in the list of bands.

This is typically the name the data provider uses for the band.

§description: Option<String>

Description to fully explain the band.

CommonMark 0.29 syntax MAY be used for rich text representation.

§nodata: Option<f64>

Value used to identify no-data.

The extension specifies that this can be a number or a string, but we just use a f64 with a custom (de)serializer.

TODO write custom (de)serializer.

§data_type: Option<DataType>

The data type of the values.

§statistics: Option<Statistics>

Statistics of all the values.

§unit: Option<String>

Unit of measurement of the value.

§additional_fields: Map<String, Value>

Additional fields on the asset.

Trait Implementations§

source§

impl Clone for Band

source§

fn clone(&self) -> Band

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Band

source§

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

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

impl<'de> Deserialize<'de> for Band

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for Band

source§

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

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

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 Serialize for Band

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl StructuralPartialEq for Band

Auto Trait Implementations§

§

impl Freeze for Band

§

impl RefUnwindSafe for Band

§

impl Send for Band

§

impl Sync for Band

§

impl Unpin for Band

§

impl UnwindSafe for Band

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

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

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

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

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

source§

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> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> ToJson for T
where T: Serialize,

source§

fn to_json_path(&self, path: impl AsRef<Path>, pretty: bool) -> Result<()>

Writes a value to a path as JSON. Read more
source§

fn to_json_writer(&self, writer: impl Write, pretty: bool) -> Result<()>

Writes a value as JSON. Read more
source§

fn to_json_vec(&self, pretty: bool) -> Result<Vec<u8>>

Writes a value as JSON bytes. Read more
source§

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

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

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

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

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

source§

type Error = Infallible

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

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

Performs the conversion.
source§

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

source§

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

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

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

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

source§

fn is_within(&self, b: &G2) -> bool

source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,