paleolimbot commented on code in PR #8225:
URL: https://github.com/apache/arrow-rs/pull/8225#discussion_r2374177575


##########
parquet/src/geospatial/statistics.rs:
##########
@@ -0,0 +1,172 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+//! Geospatial statistics for Parquet files.
+//!
+//! This module provides functionality for working with geospatial statistics 
in Parquet files.
+//! It includes support for bounding boxes and geospatial statistics in column 
chunk metadata.
+
+use crate::errors::Result;
+use crate::format::GeospatialStatistics as TGeospatialStatistics;
+use crate::geospatial::bounding_box::BoundingBox;
+
+// ----------------------------------------------------------------------
+// Geospatial Statistics
+
+/// Represents geospatial statistics for a Parquet column or dataset.
+///
+/// This struct contains metadata about the spatial characteristics of 
geospatial data,
+/// including bounding box information and the types of geospatial geometries 
present.
+/// It's used to optimize spatial queries and provide spatial context for data 
analysis.
+///
+/// # Examples
+///
+/// ```
+/// use parquet::geospatial::statistics::GeospatialStatistics;
+/// use parquet::geospatial::bounding_box::BoundingBox;
+///
+/// // Statistics with bounding box
+/// let bbox = BoundingBox::new(0.0, 0.0, 100.0, 100.0);
+/// let stats = GeospatialStatistics::new(Some(bbox), Some(vec![1, 2, 3]));
+/// ```
+#[derive(Clone, Debug, PartialEq, Default)]
+pub struct GeospatialStatistics {
+    /// Optional bounding defining the spatial extent, where None represents a 
lack of information.
+    bbox: Option<BoundingBox>,
+    /// Optional list of geometry type identifiers, where None represents lack 
of information
+    geospatial_types: Option<Vec<i32>>,

Review Comment:
   More strongly-typed enums are possibly the work of the geoarrow-rs and 
Sedonas of the world (where interested clients can convert the identifiers into 
nice structures if they need to). I think here we're just trying to provide the 
bare minimum for other libraries to be able to access the statistics.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to