jsonfg 0.1.0

Types for OGC Features and Geometries JSON (JSON-FG), a GeoJSON superset with support for arbitrary coordinate reference systems, solids, and curved geometries.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! The `measures` member (the *Measures* conformance class).

use serde::{Deserialize, Serialize};

/// Declares that positions in a geometry carry a trailing measure (`m`) value, and
/// optionally describes it.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Measures {
    /// Whether measure values are present on the coordinates.
    pub enabled: bool,
    /// The unit of measure, e.g. a UCUM code.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub unit: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub description: Option<String>,
}