Skip to main content

geoengine_api_client/models/
spatial_reference_specification.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/// SpatialReferenceSpecification : The specification of a spatial reference, where extent and axis labels are given in natural order (x, y) = (east, north)
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SpatialReferenceSpecification {
17    #[serde(rename = "axisLabels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub axis_labels: Option<Option<Vec<String>>>,
19    #[serde(rename = "axisOrder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub axis_order: Option<Option<models::AxisOrder>>,
21    #[serde(rename = "extent")]
22    pub extent: Box<models::BoundingBox2D>,
23    #[serde(rename = "name")]
24    pub name: String,
25    #[serde(rename = "projString")]
26    pub proj_string: String,
27    #[serde(rename = "spatialReference")]
28    pub spatial_reference: String,
29}
30
31impl SpatialReferenceSpecification {
32    /// The specification of a spatial reference, where extent and axis labels are given in natural order (x, y) = (east, north)
33    pub fn new(extent: models::BoundingBox2D, name: String, proj_string: String, spatial_reference: String) -> SpatialReferenceSpecification {
34        SpatialReferenceSpecification {
35            axis_labels: None,
36            axis_order: None,
37            extent: Box::new(extent),
38            name,
39            proj_string,
40            spatial_reference,
41        }
42    }
43}
44