Skip to main content

egml_core/model/measures/
grid_length.rs

1use crate::impl_measure_type;
2use crate::model::basic_types::Measure;
3
4/// A length measured in grid coordinates, with its unit of measure.
5///
6/// Corresponds to `gml:GridLengthType` in ISO 19136 — a vacuous extension of
7/// `gml:MeasureType`, used for offsets and spacings expressed in raster or
8/// grid coordinate units rather than physical length units.
9///
10/// # Examples
11///
12/// ```rust
13/// use egml_core::model::measures::GridLength;
14///
15/// let spacing = GridLength::new(1.0, "gridspacing");
16/// assert_eq!(spacing.value(), 1.0);
17/// ```
18#[derive(Debug, Clone, PartialEq, PartialOrd)]
19pub struct GridLength(Measure);
20
21impl_measure_type!(GridLength);