kylebarron commented on code in PR #8222:
URL: https://github.com/apache/arrow-rs/pull/8222#discussion_r2299230812


##########
arrow-schema/src/extension/canonical/geometry.rs:
##########
@@ -0,0 +1,136 @@
+use crate::extension::ExtensionType;
+use crate::ArrowError;
+
+/// Geospatial features in the WKB format with linear/planar edges 
interpolation
+#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)]
+pub struct Geometry {
+    crs: Option<String>,
+}
+
+impl Geometry {
+    /// Create a new Geometry extension type with an optional CRS.
+    pub fn new(crs: Option<String>) -> Self {
+        Self { crs }
+    }
+
+    /// Get the CRS of the Geometry type, if any.
+    pub fn crs(&self) -> Option<&str> {
+        self.crs.as_deref()
+    }
+}
+
+impl ExtensionType for Geometry {
+    const NAME: &'static str = "geoarrow.wkb";
+
+    type Metadata = ();

Review Comment:
   I think they're separate types in the Parquet spec because some execution 
operations that are valid on Geometry types are not valid on Geography types 
and vice versa. And so it's useful to know in query planning whether the 
described operation is valid.



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to