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


##########
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:
   Ah yes, that makes sense for the edge interpolation needing an `Option`. I 
didn't initially realize the spec defined edge interpolation algorithms didn't 
include a `LINEAR` variant.
   
   My reading of the parquet spec suggests the _only_ difference between the 
two types is linear vs non-linear edge interpolation. Am I missing something? 
If not, are you privy to why they are separate types? On the surface it feels 
odd to carry them as separate types.



-- 
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