geoengine_api_client/models/temporal_raster_aggregation.rs
1/*
2 * Geo Engine API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 0.9.0
7 * Contact: dev@geoengine.de
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// TemporalRasterAggregation : The `TemporalRasterAggregation` operator aggregates a raster time series into uniform time windows. The output starts with the first window that contains the query start and contains all windows that overlap the query interval. Pixel values are computed by aggregating all input rasters that contribute to the current window. ## Inputs The `TemporalRasterAggregation` operator expects exactly one _raster_ input. ## Errors If the aggregation method is `first`, `last`, or `mean` and the input raster has no NO DATA value, an error is returned.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TemporalRasterAggregation {
17 #[serde(rename = "params")]
18 pub params: Box<models::TemporalRasterAggregationParameters>,
19 #[serde(rename = "sources")]
20 pub sources: Box<models::SingleRasterSource>,
21 #[serde(rename = "type")]
22 pub r#type: Type,
23}
24
25impl TemporalRasterAggregation {
26 /// The `TemporalRasterAggregation` operator aggregates a raster time series into uniform time windows. The output starts with the first window that contains the query start and contains all windows that overlap the query interval. Pixel values are computed by aggregating all input rasters that contribute to the current window. ## Inputs The `TemporalRasterAggregation` operator expects exactly one _raster_ input. ## Errors If the aggregation method is `first`, `last`, or `mean` and the input raster has no NO DATA value, an error is returned.
27 pub fn new(params: models::TemporalRasterAggregationParameters, sources: models::SingleRasterSource, r#type: Type) -> TemporalRasterAggregation {
28 TemporalRasterAggregation {
29 params: Box::new(params),
30 sources: Box::new(sources),
31 r#type,
32 }
33 }
34}
35///
36#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
37pub enum Type {
38 #[serde(rename = "TemporalRasterAggregation")]
39 TemporalRasterAggregation,
40}
41
42impl Default for Type {
43 fn default() -> Type {
44 Self::TemporalRasterAggregation
45 }
46}
47