diff --git a/src/array/binary/array.rs b/src/array/binary/array.rs index 51d8eb6d..bd7f5b42 100644 --- a/src/array/binary/array.rs +++ b/src/array/binary/array.rs @@ -59,7 +59,7 @@ impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for WKBArray { let mut metadata = HashMap::new(); metadata.insert( "ARROW:extension:name".to_string(), - "geoarrow.wkb".to_string(), + self.extension_name().to_string(), ); Arc::new(Field::new("geometry", self.storage_type(), true).with_metadata(metadata)) } diff --git a/src/array/geometrycollection/array.rs b/src/array/geometrycollection/array.rs index aba46c7b..c96f1f15 100644 --- a/src/array/geometrycollection/array.rs +++ b/src/array/geometrycollection/array.rs @@ -78,7 +78,7 @@ impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for GeometryCollectionArray< let mut metadata = HashMap::new(); metadata.insert( "ARROW:extension:name".to_string(), - "geoarrow.geometrycollection".to_string(), + self.extension_name().to_string(), ); Arc::new(Field::new("geometry", self.storage_type(), true).with_metadata(metadata)) } diff --git a/src/array/linestring/array.rs b/src/array/linestring/array.rs index 0a2601b5..af5b1580 100644 --- a/src/array/linestring/array.rs +++ b/src/array/linestring/array.rs @@ -128,7 +128,7 @@ impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for LineStringArray { let mut field_metadata = HashMap::new(); field_metadata.insert( "ARROW:extension:name".to_string(), - "geoarrow.linestring".to_string(), + self.extension_name().to_string(), ); Arc::new(Field::new("", self.storage_type(), true).with_metadata(field_metadata)) } diff --git a/src/array/mixed/array.rs b/src/array/mixed/array.rs index 43a63c2a..cbbb829b 100644 --- a/src/array/mixed/array.rs +++ b/src/array/mixed/array.rs @@ -229,7 +229,7 @@ impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for MixedGeometryArray { let mut metadata = HashMap::new(); metadata.insert( "ARROW:extension:name".to_string(), - "geoarrow.mixed".to_string(), + self.extension_name().to_string(), ); Arc::new(Field::new("geometry", self.storage_type(), true).with_metadata(metadata)) } diff --git a/src/array/multilinestring/array.rs b/src/array/multilinestring/array.rs index 1f67ac6d..c4097c1e 100644 --- a/src/array/multilinestring/array.rs +++ b/src/array/multilinestring/array.rs @@ -163,7 +163,7 @@ impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for MultiLineStringArray let mut metadata = HashMap::new(); metadata.insert( "ARROW:extension:name".to_string(), - "geoarrow.multilinestring".to_string(), + self.extension_name().to_string(), ); Arc::new(Field::new("geometry", self.storage_type(), true).with_metadata(metadata)) } diff --git a/src/array/multipoint/array.rs b/src/array/multipoint/array.rs index 10cdde89..7062dbe1 100644 --- a/src/array/multipoint/array.rs +++ b/src/array/multipoint/array.rs @@ -127,7 +127,7 @@ impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for MultiPointArray { let mut metadata = HashMap::new(); metadata.insert( "ARROW:extension:name".to_string(), - "geoarrow.multipoint".to_string(), + self.extension_name().to_string(), ); Arc::new(Field::new("geometry", self.storage_type(), true).with_metadata(metadata)) } diff --git a/src/array/multipolygon/array.rs b/src/array/multipolygon/array.rs index c772bfb6..1e4bc5a1 100644 --- a/src/array/multipolygon/array.rs +++ b/src/array/multipolygon/array.rs @@ -195,7 +195,7 @@ impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for MultiPolygonArray { let mut metadata = HashMap::new(); metadata.insert( "ARROW:extension:name".to_string(), - "geoarrow.multipolygon".to_string(), + self.extension_name().to_string(), ); Arc::new(Field::new("geometry", self.storage_type(), true).with_metadata(metadata)) } diff --git a/src/array/point/array.rs b/src/array/point/array.rs index fb04b98f..a551b2c1 100644 --- a/src/array/point/array.rs +++ b/src/array/point/array.rs @@ -92,7 +92,7 @@ impl<'a> GeometryArrayTrait<'a> for PointArray { let mut metadata = HashMap::new(); metadata.insert( "ARROW:extension:name".to_string(), - "geoarrow.point".to_string(), + self.extension_name().to_string(), ); Arc::new(Field::new("geometry", self.storage_type(), true).with_metadata(metadata)) } diff --git a/src/array/polygon/array.rs b/src/array/polygon/array.rs index f065f410..f968af5c 100644 --- a/src/array/polygon/array.rs +++ b/src/array/polygon/array.rs @@ -163,7 +163,7 @@ impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for PolygonArray { let mut metadata = HashMap::new(); metadata.insert( "ARROW:extension:name".to_string(), - "geoarrow.polygon".to_string(), + self.extension_name().to_string(), ); Arc::new(Field::new("geometry", self.storage_type(), true).with_metadata(metadata)) } diff --git a/src/array/rect/array.rs b/src/array/rect/array.rs index 17ad3345..16f8fe39 100644 --- a/src/array/rect/array.rs +++ b/src/array/rect/array.rs @@ -50,7 +50,7 @@ impl<'a> GeometryArrayTrait<'a> for RectArray { let mut metadata = HashMap::new(); metadata.insert( "ARROW:extension:name".to_string(), - "geoarrow._rect".to_string(), + self.extension_name().to_string(), ); Arc::new(Field::new("geometry", self.storage_type(), true).with_metadata(metadata)) } @@ -58,6 +58,7 @@ impl<'a> GeometryArrayTrait<'a> for RectArray { fn extension_name(&self) -> &str { "geoarrow._rect" } + fn into_arrow(self) -> Self::ArrowArray { let inner_field = self.inner_field(); let validity = self.validity;