Skip to main content

geoengine_api_client/models/
histogram.rs

1/*
2 * Geo Engine API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * Contact: dev@geoengine.de
7 * Generated by: https://openapi-generator.tech
8 */
9
10use crate::models;
11use serde::{Deserialize, Serialize};
12
13/// Histogram : The `Histogram` is a _plot operator_ that computes a histogram plot either over attributes of a vector dataset or values of a raster source. The output is a plot in [Vega-Lite](https://vega.github.io/vega-lite/) specification.  For instance, you want to plot the data distribution of numeric attributes of a feature collection. Then you can use a histogram with a suitable number of buckets to visualize and assess this.  ## Errors  The operator returns an error if the selected column (`columnName`) does not exist or is not numeric.  ## Notes  If `bounds` or `buckets` are not defined, the operator will determine these values by itself which requires processing the data twice.  If the `buckets` parameter is set to `squareRootChoiceRule`, the operator estimates it using the square root of the number of elements in the data. 
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Histogram {
16    #[serde(rename = "params")]
17    pub params: Box<models::HistogramParameters>,
18    #[serde(rename = "sources")]
19    pub sources: Box<models::SingleVectorOrRasterSource>,
20    #[serde(rename = "type")]
21    pub r#type: Type,
22}
23
24impl Histogram {
25    /// The `Histogram` is a _plot operator_ that computes a histogram plot either over attributes of a vector dataset or values of a raster source. The output is a plot in [Vega-Lite](https://vega.github.io/vega-lite/) specification.  For instance, you want to plot the data distribution of numeric attributes of a feature collection. Then you can use a histogram with a suitable number of buckets to visualize and assess this.  ## Errors  The operator returns an error if the selected column (`columnName`) does not exist or is not numeric.  ## Notes  If `bounds` or `buckets` are not defined, the operator will determine these values by itself which requires processing the data twice.  If the `buckets` parameter is set to `squareRootChoiceRule`, the operator estimates it using the square root of the number of elements in the data. 
26    pub fn new(params: models::HistogramParameters, sources: models::SingleVectorOrRasterSource, r#type: Type) -> Histogram {
27        Histogram {
28            params: Box::new(params),
29            sources: Box::new(sources),
30            r#type,
31        }
32    }
33}
34/// 
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum Type {
37    #[serde(rename = "Histogram")]
38    Histogram,
39}
40
41impl Default for Type {
42    fn default() -> Type {
43        Self::Histogram
44    }
45}
46