pub struct GenericWktArray<O: OffsetSizeTrait> { /* private fields */ }
Expand description
An immutable array of WKT geometries using GeoArrow’s in-memory representation.
This is a wrapper around an Arrow GenericStringArray and is semantically equivalent to
Vec<Option<WKT>>
due to the internal validity bitmap.
Refer to crate::cast
for converting this array to other GeoArrow array types.
Implementations§
Source§impl<O: OffsetSizeTrait> GenericWktArray<O>
impl<O: OffsetSizeTrait> GenericWktArray<O>
Sourcepub fn new(array: GenericStringArray<O>, metadata: Arc<Metadata>) -> Self
pub fn new(array: GenericStringArray<O>, metadata: Arc<Metadata>) -> Self
Create a new GenericWktArray from a StringArray
Sourcepub fn inner(&self) -> &GenericStringArray<O>
pub fn inner(&self) -> &GenericStringArray<O>
Access the underlying string array.
Sourcepub fn with_metadata(&self, metadata: Arc<Metadata>) -> Self
pub fn with_metadata(&self, metadata: Arc<Metadata>) -> Self
Replace the Metadata
contained in this array.
Trait Implementations§
Source§impl<O: Clone + OffsetSizeTrait> Clone for GenericWktArray<O>
impl<O: Clone + OffsetSizeTrait> Clone for GenericWktArray<O>
Source§fn clone(&self) -> GenericWktArray<O>
fn clone(&self) -> GenericWktArray<O>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<O: Debug + OffsetSizeTrait> Debug for GenericWktArray<O>
impl<O: Debug + OffsetSizeTrait> Debug for GenericWktArray<O>
Source§impl<O: OffsetSizeTrait> From<(GenericByteArray<GenericStringType<O>>, WktType)> for GenericWktArray<O>
impl<O: OffsetSizeTrait> From<(GenericByteArray<GenericStringType<O>>, WktType)> for GenericWktArray<O>
Source§fn from((value, typ): (GenericStringArray<O>, WktType)) -> Self
fn from((value, typ): (GenericStringArray<O>, WktType)) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> From<GenericWktArray<O>> for WktViewArray
impl<O: OffsetSizeTrait> From<GenericWktArray<O>> for WktViewArray
Source§fn from(value: GenericWktArray<O>) -> Self
fn from(value: GenericWktArray<O>) -> Self
Converts to this type from the input type.
Source§impl From<GenericWktArray<i32>> for GenericWktArray<i64>
impl From<GenericWktArray<i32>> for GenericWktArray<i64>
Source§fn from(value: GenericWktArray<i32>) -> Self
fn from(value: GenericWktArray<i32>) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> From<WktViewArray> for GenericWktArray<O>
impl<O: OffsetSizeTrait> From<WktViewArray> for GenericWktArray<O>
Source§fn from(value: WktViewArray) -> Self
fn from(value: WktViewArray) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> GeoArrowArray for GenericWktArray<O>
impl<O: OffsetSizeTrait> GeoArrowArray for GenericWktArray<O>
Source§fn into_array_ref(self) -> ArrayRef
fn into_array_ref(self) -> ArrayRef
Source§fn logical_nulls(&self) -> Option<NullBuffer>
fn logical_nulls(&self) -> Option<NullBuffer>
Returns a potentially computed `NullBuffer`` that represents the logical null values of
this array, if any. Read more
Source§fn logical_null_count(&self) -> usize
fn logical_null_count(&self) -> usize
Returns the number of null slots in this array. Read more
Source§fn data_type(&self) -> GeoArrowType
fn data_type(&self) -> GeoArrowType
Returns the
GeoArrowType
of this array. Read moreSource§fn slice(&self, offset: usize, length: usize) -> Arc<dyn GeoArrowArray>
fn slice(&self, offset: usize, length: usize) -> Arc<dyn GeoArrowArray>
Returns a zero-copy slice of this array with the indicated offset and length. Read more
Source§fn with_metadata(self, metadata: Arc<Metadata>) -> Arc<dyn GeoArrowArray>
fn with_metadata(self, metadata: Arc<Metadata>) -> Arc<dyn GeoArrowArray>
Change the
Metadata
of this array.Source§impl<'a, O: OffsetSizeTrait> GeoArrowArrayAccessor<'a> for GenericWktArray<O>
impl<'a, O: OffsetSizeTrait> GeoArrowArrayAccessor<'a> for GenericWktArray<O>
Source§type Item = Wkt
type Item = Wkt
The geoarrow scalar object for this geometry array type.
Source§unsafe fn value_unchecked(&'a self, index: usize) -> GeoArrowResult<Self::Item>
unsafe fn value_unchecked(&'a self, index: usize) -> GeoArrowResult<Self::Item>
Returns the element at index
i
, not considering validity. Read moreSource§fn value(&'a self, index: usize) -> GeoArrowResult<Self::Item>
fn value(&'a self, index: usize) -> GeoArrowResult<Self::Item>
Returns the element at index
i
, not considering validity. Read moreSource§fn get(&'a self, index: usize) -> GeoArrowResult<Option<Self::Item>>
fn get(&'a self, index: usize) -> GeoArrowResult<Option<Self::Item>>
Returns the value at slot
i
as an Arrow scalar, considering validity. Read moreSource§unsafe fn get_unchecked(
&'a self,
index: usize,
) -> Option<GeoArrowResult<Self::Item>>
unsafe fn get_unchecked( &'a self, index: usize, ) -> Option<GeoArrowResult<Self::Item>>
Returns the value at slot
i
as an Arrow scalar, considering validity. Read moreSource§fn iter(
&'a self,
) -> impl ExactSizeIterator<Item = Option<GeoArrowResult<Self::Item>>> + 'a
fn iter( &'a self, ) -> impl ExactSizeIterator<Item = Option<GeoArrowResult<Self::Item>>> + 'a
Iterates over this array’s geoarrow scalar values, considering validity. Read more
Source§fn iter_values(
&'a self,
) -> impl ExactSizeIterator<Item = GeoArrowResult<Self::Item>> + 'a
fn iter_values( &'a self, ) -> impl ExactSizeIterator<Item = GeoArrowResult<Self::Item>> + 'a
Iterator over geoarrow scalar values, not considering validity. Read more
Source§impl<O: OffsetSizeTrait> IntoArrow for GenericWktArray<O>
impl<O: OffsetSizeTrait> IntoArrow for GenericWktArray<O>
Source§type ArrowArray = GenericByteArray<GenericStringType<O>>
type ArrowArray = GenericByteArray<GenericStringType<O>>
The type of arrow array that this geoarrow array can be converted into.
Source§type ExtensionType = WktType
type ExtensionType = WktType
The extension type representing this array. It will always be a type defined by
geoarrow_schema.
Source§fn into_arrow(self) -> Self::ArrowArray
fn into_arrow(self) -> Self::ArrowArray
Converts this geoarrow array into an arrow array. Read more
Source§fn extension_type(&self) -> &Self::ExtensionType
fn extension_type(&self) -> &Self::ExtensionType
Return the Arrow extension type representing this array.
Source§impl<O: PartialEq + OffsetSizeTrait> PartialEq for GenericWktArray<O>
impl<O: PartialEq + OffsetSizeTrait> PartialEq for GenericWktArray<O>
Source§impl TryFrom<(&dyn Array, &Field)> for GenericWktArray<i32>
impl TryFrom<(&dyn Array, &Field)> for GenericWktArray<i32>
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§impl TryFrom<(&dyn Array, &Field)> for GenericWktArray<i64>
impl TryFrom<(&dyn Array, &Field)> for GenericWktArray<i64>
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§impl TryFrom<(&dyn Array, WktType)> for GenericWktArray<i32>
impl TryFrom<(&dyn Array, WktType)> for GenericWktArray<i32>
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§impl TryFrom<(&dyn Array, WktType)> for GenericWktArray<i64>
impl TryFrom<(&dyn Array, WktType)> for GenericWktArray<i64>
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§impl TryFrom<GenericWktArray<i64>> for GenericWktArray<i32>
impl TryFrom<GenericWktArray<i64>> for GenericWktArray<i32>
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§fn try_from(value: GenericWktArray<i64>) -> GeoArrowResult<Self>
fn try_from(value: GenericWktArray<i64>) -> GeoArrowResult<Self>
Performs the conversion.
impl GenericWktArrayType for GenericWktArray<i32>
impl GenericWktArrayType for GenericWktArray<i64>
impl<O: OffsetSizeTrait> StructuralPartialEq for GenericWktArray<O>
Auto Trait Implementations§
impl<O> Freeze for GenericWktArray<O>
impl<O> RefUnwindSafe for GenericWktArray<O>where
O: RefUnwindSafe,
impl<O> Send for GenericWktArray<O>
impl<O> Sync for GenericWktArray<O>
impl<O> Unpin for GenericWktArray<O>where
O: Unpin,
impl<O> UnwindSafe for GenericWktArray<O>where
O: UnwindSafe,
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
Mutably borrows from an owned value. Read more