Skip to main content

egml_core/model/basic/
measure.rs

1/// A numeric value with an associated unit-of-measure.
2///
3/// Corresponds to `gml:MeasureType` in ISO 19136.  The `uom` field is a
4/// URI or UCUM expression identifying the unit (e.g. `"m"`, `"deg"`,
5/// `"urn:ogc:def:uom:OGC:1.0:metre"`).
6///
7/// # Examples
8///
9/// ```rust
10/// use egml_core::model::basic::Measure;
11///
12/// let height = Measure { uom: "m".to_string(), value: 12.5 };
13/// assert_eq!(height.value, 12.5);
14/// ```
15#[derive(Debug, Clone, PartialEq, PartialOrd)]
16pub struct Measure {
17    /// URI or UCUM expression identifying the unit of measure.
18    pub uom: String,
19    /// The numeric measurement value.
20    pub value: f64,
21}