geoarrow_schema/coord_type.rs
1/// The permitted GeoArrow coordinate representations.
2///
3/// GeoArrow permits coordinate types to either be "Interleaved", where the X and Y coordinates are
4/// in a single buffer as `XYXYXY` or "Separated", where the X and Y coordinates are in multiple
5/// buffers as `XXXX` and `YYYY`.
6#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
7pub enum CoordType {
8 /// Interleaved coordinates.
9 ///
10 /// This stores coordinates in an Arrow
11 /// [fixed-size-list-typed][arrow_schema::DataType::FixedSizeList] array.
12 ///
13 /// The size of the internal fixed-size list depends on the [dimension][crate::Dimension] of
14 /// the array.
15 ///
16 /// ```notest
17 /// FixedSizeList<double>[n_dim]
18 /// ```
19 Interleaved,
20
21 /// Separated coordinates.
22 ///
23 /// This stores coordinates in an Arrow [struct-typed][arrow_schema::DataType::Struct] array:
24 ///
25 /// ```notest
26 /// Struct<x: double, y: double, [z: double, [m: double>]]
27 /// ```
28 #[default]
29 Separated,
30}