pub struct GeoStatistics { /* private fields */ }Expand description
Statistics specific to spatial data types
These statistics are an abstraction to provide sedonadb the ability to perform generic pruning and optimization for datasources that have the ability to provide this information. This may evolve to support more fields; however, can currently express Parquet built-in GeoStatistics, GeoParquet metadata, and GDAL OGR (via GetExtent() and GetGeomType()). This struct can also represent partial or missing information.
Implementations§
Source§impl GeoStatistics
impl GeoStatistics
Sourcepub const UNSPECIFIED: GeoStatistics
pub const UNSPECIFIED: GeoStatistics
Statistics representing unspecified information
Sourcepub fn unspecified() -> Self
pub fn unspecified() -> Self
Create statistics representing unspecified information
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Create statistics representing empty information (with zero values instead of None)
Sourcepub fn with_bbox(self, bbox: Option<BoundingBox>) -> Self
pub fn with_bbox(self, bbox: Option<BoundingBox>) -> Self
Update the bounding box and return self
Sourcepub fn with_geometry_types(
self,
types: Option<GeometryTypeAndDimensionsSet>,
) -> Self
pub fn with_geometry_types( self, types: Option<GeometryTypeAndDimensionsSet>, ) -> Self
Update the geometry types and return self
Sourcepub fn bbox(&self) -> Option<&BoundingBox>
pub fn bbox(&self) -> Option<&BoundingBox>
Get the bounding box if available
Sourcepub fn geometry_types(&self) -> Option<&GeometryTypeAndDimensionsSet>
pub fn geometry_types(&self) -> Option<&GeometryTypeAndDimensionsSet>
Get the geometry types if available
Sourcepub fn total_geometries(&self) -> Option<i64>
pub fn total_geometries(&self) -> Option<i64>
Get the total number of geometries if available
Sourcepub fn total_size_bytes(&self) -> Option<i64>
pub fn total_size_bytes(&self) -> Option<i64>
Get the total size in bytes if available
Sourcepub fn total_points(&self) -> Option<i64>
pub fn total_points(&self) -> Option<i64>
Get the total number of points if available
Sourcepub fn puntal_count(&self) -> Option<i64>
pub fn puntal_count(&self) -> Option<i64>
Get the count of puntal geometries if available
Sourcepub fn lineal_count(&self) -> Option<i64>
pub fn lineal_count(&self) -> Option<i64>
Get the count of lineal geometries if available
Sourcepub fn polygonal_count(&self) -> Option<i64>
pub fn polygonal_count(&self) -> Option<i64>
Get the count of polygonal geometries if available
Sourcepub fn collection_count(&self) -> Option<i64>
pub fn collection_count(&self) -> Option<i64>
Get the count of geometry collections if available
Sourcepub fn total_envelope_width(&self) -> Option<f64>
pub fn total_envelope_width(&self) -> Option<f64>
Get the total envelope width if available
Sourcepub fn total_envelope_height(&self) -> Option<f64>
pub fn total_envelope_height(&self) -> Option<f64>
Get the total envelope height if available
Sourcepub fn mean_envelope_width(&self) -> Option<f64>
pub fn mean_envelope_width(&self) -> Option<f64>
Calculate the mean envelope width if possible
Sourcepub fn mean_envelope_height(&self) -> Option<f64>
pub fn mean_envelope_height(&self) -> Option<f64>
Calculate the mean envelope height if possible
Sourcepub fn mean_envelope_area(&self) -> Option<f64>
pub fn mean_envelope_area(&self) -> Option<f64>
Calculate the mean envelope area if possible
Sourcepub fn mean_size_bytes(&self) -> Option<f64>
pub fn mean_size_bytes(&self) -> Option<f64>
Calculate the mean size in bytes if possible
Sourcepub fn mean_points_per_geometry(&self) -> Option<f64>
pub fn mean_points_per_geometry(&self) -> Option<f64>
Calculate the mean points per geometry if possible
Sourcepub fn with_total_geometries(self, count: i64) -> Self
pub fn with_total_geometries(self, count: i64) -> Self
Update the total geometries count and return self
Sourcepub fn with_total_size_bytes(self, bytes: i64) -> Self
pub fn with_total_size_bytes(self, bytes: i64) -> Self
Update the total size in bytes and return self
Sourcepub fn with_total_points(self, points: i64) -> Self
pub fn with_total_points(self, points: i64) -> Self
Update the total points count and return self
Sourcepub fn with_puntal_count(self, count: i64) -> Self
pub fn with_puntal_count(self, count: i64) -> Self
Update the puntal geometries count and return self
Sourcepub fn with_lineal_count(self, count: i64) -> Self
pub fn with_lineal_count(self, count: i64) -> Self
Update the lineal geometries count and return self
Sourcepub fn with_polygonal_count(self, count: i64) -> Self
pub fn with_polygonal_count(self, count: i64) -> Self
Update the polygonal geometries count and return self
Sourcepub fn with_collection_count(self, count: i64) -> Self
pub fn with_collection_count(self, count: i64) -> Self
Update the collection geometries count and return self
Sourcepub fn with_total_envelope_width(self, width: f64) -> Self
pub fn with_total_envelope_width(self, width: f64) -> Self
Update the total envelope width and return self
Sourcepub fn with_total_envelope_height(self, height: f64) -> Self
pub fn with_total_envelope_height(self, height: f64) -> Self
Update the total envelope height and return self
Sourcepub fn try_from_column_statistics(
stats: &ColumnStatistics,
) -> Result<Option<Self>>
pub fn try_from_column_statistics( stats: &ColumnStatistics, ) -> Result<Option<Self>>
Try to deserialize GeoStatistics from DataFusion ColumnStatistics
Various DataFusion APIs operate on ColumnStatistics, which do not support spatial statistics natively. This function attempts to reconstruct an object that was canonically serialized into one of these objects for transport through DataFusion internals.
Sourcepub fn to_column_statistics(&self) -> Result<ColumnStatistics>
pub fn to_column_statistics(&self) -> Result<ColumnStatistics>
Serialize this object into a ColumnStatistics
Canonically place this object into a ColumnStatistics for transport through DataFusion APIs.
Sourcepub fn try_with_str_geometry_types(
self,
geometry_types: Option<&[&str]>,
) -> Result<Self>
pub fn try_with_str_geometry_types( self, geometry_types: Option<&[&str]>, ) -> Result<Self>
Add a definitive list of geometry type/dimension values specified as strings
This accepts a list of strings like “point z” or “polygon zm”. These strings are case insensitive.
Sourcepub fn to_scalar_value(&self) -> Result<ScalarValue>
pub fn to_scalar_value(&self) -> Result<ScalarValue>
Convert this GeoStatistics to a ScalarValue for storage in DataFusion statistics
Trait Implementations§
Source§impl Clone for GeoStatistics
impl Clone for GeoStatistics
Source§fn clone(&self) -> GeoStatistics
fn clone(&self) -> GeoStatistics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GeoStatistics
impl Debug for GeoStatistics
Source§impl<'de> Deserialize<'de> for GeoStatistics
impl<'de> Deserialize<'de> for GeoStatistics
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>,
Source§impl From<GeoStatistics> for TableGeoStatistics
impl From<GeoStatistics> for TableGeoStatistics
Source§fn from(value: GeoStatistics) -> Self
fn from(value: GeoStatistics) -> Self
Source§impl PartialEq for GeoStatistics
impl PartialEq for GeoStatistics
Source§impl Serialize for GeoStatistics
impl Serialize for GeoStatistics
impl StructuralPartialEq for GeoStatistics
Auto Trait Implementations§
impl Freeze for GeoStatistics
impl RefUnwindSafe for GeoStatistics
impl Send for GeoStatistics
impl Sync for GeoStatistics
impl Unpin for GeoStatistics
impl UnsafeUnpin for GeoStatistics
impl UnwindSafe for GeoStatistics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more