GeometryTypeId

Trait GeometryTypeId 

Source
pub trait GeometryTypeId {
    const GEOMETRY_TYPE_OFFSET: i8;

    // Required method
    fn dimension(&self) -> Dimension;

    // Provided method
    fn geometry_type_id(&self) -> i8 { ... }
}
Expand description

Compute the Type ID for an array type-dimension combination.

The GeoArrow specification defines a Type ID for each geometry type and dimension combination. https://geoarrow.org/format.html#geometry

Required Associated Constants§

Source

const GEOMETRY_TYPE_OFFSET: i8

The integer offset for this geometry type.

This matches the 2D geometry type IDs defined in the GeoArrow specification. For example, Point is 1, LineString is 2, etc.

Required Methods§

Source

fn dimension(&self) -> Dimension

The dimension of this geometry type.

Provided Methods§

Source

fn geometry_type_id(&self) -> i8

The Type ID for this geometry type and dimension.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§