pub struct GeometryTypeAndDimensions { /* private fields */ }Expand description
Geometry type and dimension
Combines a GeometryTypeId with Dimensions to handle cases where these concepts are represented together (e.g., GeoParquet geometry types, WKB geometry type integers, Parquet GeoStatistics). For sanity’s sake, this combined concept is also frequently just called “geometry type”.
Implementations§
Source§impl GeometryTypeAndDimensions
impl GeometryTypeAndDimensions
Sourcepub fn new(geometry_type: GeometryTypeId, dimensions: Dimensions) -> Self
pub fn new(geometry_type: GeometryTypeId, dimensions: Dimensions) -> Self
Create from GeometryTypeId and Dimensions
Sourcepub fn try_from_geom(
geom: &impl GeometryTrait,
) -> Result<Self, SedonaGeometryError>
pub fn try_from_geom( geom: &impl GeometryTrait, ) -> Result<Self, SedonaGeometryError>
Create from GeometryTrait
Sourcepub fn geometry_type(&self) -> GeometryTypeId
pub fn geometry_type(&self) -> GeometryTypeId
The GeometryTypeId
Sourcepub fn dimensions(&self) -> Dimensions
pub fn dimensions(&self) -> Dimensions
The Dimensions
Sourcepub fn try_from_wkb_id(wkb_id: u32) -> Result<Self, SedonaGeometryError>
pub fn try_from_wkb_id(wkb_id: u32) -> Result<Self, SedonaGeometryError>
Create from an ISO WKB integer identifier (e.g., 1001 for Point Z)
Sourcepub fn geojson_id(&self) -> String
pub fn geojson_id(&self) -> String
GeoJSON/GeoParquet identifier (e.g., Point Z, LineString, Polygon ZM)
Trait Implementations§
Source§impl Clone for GeometryTypeAndDimensions
impl Clone for GeometryTypeAndDimensions
Source§fn clone(&self) -> GeometryTypeAndDimensions
fn clone(&self) -> GeometryTypeAndDimensions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GeometryTypeAndDimensions
impl Debug for GeometryTypeAndDimensions
Source§impl<'de> Deserialize<'de> for GeometryTypeAndDimensions
impl<'de> Deserialize<'de> for GeometryTypeAndDimensions
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for GeometryTypeAndDimensions
impl Display for GeometryTypeAndDimensions
Source§impl From<(GeometryTypeId, Dimensions)> for GeometryTypeAndDimensions
impl From<(GeometryTypeId, Dimensions)> for GeometryTypeAndDimensions
Source§fn from(value: (GeometryTypeId, Dimensions)) -> Self
fn from(value: (GeometryTypeId, Dimensions)) -> Self
Converts to this type from the input type.
Source§impl FromStr for GeometryTypeAndDimensions
impl FromStr for GeometryTypeAndDimensions
Source§impl Hash for GeometryTypeAndDimensions
impl Hash for GeometryTypeAndDimensions
Source§impl Serialize for GeometryTypeAndDimensionswhere
Self: Display,
impl Serialize for GeometryTypeAndDimensionswhere
Self: Display,
impl Copy for GeometryTypeAndDimensions
impl Eq for GeometryTypeAndDimensions
impl StructuralPartialEq for GeometryTypeAndDimensions
Auto Trait Implementations§
impl Freeze for GeometryTypeAndDimensions
impl RefUnwindSafe for GeometryTypeAndDimensions
impl Send for GeometryTypeAndDimensions
impl Sync for GeometryTypeAndDimensions
impl Unpin for GeometryTypeAndDimensions
impl UnsafeUnpin for GeometryTypeAndDimensions
impl UnwindSafe for GeometryTypeAndDimensions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.