pub struct GenericWkbArray<O: OffsetSizeTrait> { /* private fields */ }
Expand description
An immutable array of WKB geometries.
This is stored either as an Arrow BinaryArray
or LargeBinaryArray
and is semantically
equivalent to Vec<Option<Wkb>>
due to the internal validity bitmap.
Refer to crate::cast
for converting this array to other GeoArrow array types.
Implementations§
Source§impl<O: OffsetSizeTrait> GenericWkbArray<O>
impl<O: OffsetSizeTrait> GenericWkbArray<O>
Sourcepub fn new(array: GenericBinaryArray<O>, metadata: Arc<Metadata>) -> Self
pub fn new(array: GenericBinaryArray<O>, metadata: Arc<Metadata>) -> Self
Create a new GenericWkbArray from a BinaryArray
Sourcepub fn inner(&self) -> &GenericBinaryArray<O>
pub fn inner(&self) -> &GenericBinaryArray<O>
Access the underlying binary array.
Sourcepub fn buffer_lengths(&self) -> WkbCapacity
pub fn buffer_lengths(&self) -> WkbCapacity
The lengths of each buffer contained in this array.
Sourcepub fn with_metadata(&self, metadata: Arc<Metadata>) -> Self
pub fn with_metadata(&self, metadata: Arc<Metadata>) -> Self
Replace the Metadata in the array with the given metadata
Trait Implementations§
Source§impl<O: Clone + OffsetSizeTrait> Clone for GenericWkbArray<O>
impl<O: Clone + OffsetSizeTrait> Clone for GenericWkbArray<O>
Source§fn clone(&self) -> GenericWkbArray<O>
fn clone(&self) -> GenericWkbArray<O>
Returns a duplicate 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 GenericWkbArray<O>
impl<O: Debug + OffsetSizeTrait> Debug for GenericWkbArray<O>
Source§impl<O: OffsetSizeTrait> From<(GenericByteArray<GenericBinaryType<O>>, WkbType)> for GenericWkbArray<O>
impl<O: OffsetSizeTrait> From<(GenericByteArray<GenericBinaryType<O>>, WkbType)> for GenericWkbArray<O>
Source§fn from((value, typ): (GenericBinaryArray<O>, WkbType)) -> Self
fn from((value, typ): (GenericBinaryArray<O>, WkbType)) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> From<GenericWkbArray<O>> for WkbViewArray
impl<O: OffsetSizeTrait> From<GenericWkbArray<O>> for WkbViewArray
Source§fn from(value: GenericWkbArray<O>) -> Self
fn from(value: GenericWkbArray<O>) -> Self
Converts to this type from the input type.
Source§impl From<GenericWkbArray<i32>> for GenericWkbArray<i64>
impl From<GenericWkbArray<i32>> for GenericWkbArray<i64>
Source§fn from(value: GenericWkbArray<i32>) -> Self
fn from(value: GenericWkbArray<i32>) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> From<WkbViewArray> for GenericWkbArray<O>
impl<O: OffsetSizeTrait> From<WkbViewArray> for GenericWkbArray<O>
Source§fn from(value: WkbViewArray) -> Self
fn from(value: WkbViewArray) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> GeoArrowArray for GenericWkbArray<O>
impl<O: OffsetSizeTrait> GeoArrowArray for GenericWkbArray<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 GenericWkbArray<O>
impl<'a, O: OffsetSizeTrait> GeoArrowArrayAccessor<'a> for GenericWkbArray<O>
Source§type Item = Wkb<'a>
type Item = Wkb<'a>
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> GeozeroGeometry for GenericWkbArray<O>
Available on crate feature geozero
only.
impl<O: OffsetSizeTrait> GeozeroGeometry for GenericWkbArray<O>
Available on crate feature
geozero
only.Source§impl<O: OffsetSizeTrait> IntoArrow for GenericWkbArray<O>
impl<O: OffsetSizeTrait> IntoArrow for GenericWkbArray<O>
Source§type ArrowArray = GenericByteArray<GenericBinaryType<O>>
type ArrowArray = GenericByteArray<GenericBinaryType<O>>
The type of arrow array that this geoarrow array can be converted into.
Source§type ExtensionType = WkbType
type ExtensionType = WkbType
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 GenericWkbArray<O>
impl<O: PartialEq + OffsetSizeTrait> PartialEq for GenericWkbArray<O>
Source§impl TryFrom<(&dyn Array, &Field)> for GenericWkbArray<i32>
impl TryFrom<(&dyn Array, &Field)> for GenericWkbArray<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 GenericWkbArray<i64>
impl TryFrom<(&dyn Array, &Field)> for GenericWkbArray<i64>
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§impl TryFrom<(&dyn Array, WkbType)> for GenericWkbArray<i32>
impl TryFrom<(&dyn Array, WkbType)> for GenericWkbArray<i32>
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§impl TryFrom<(&dyn Array, WkbType)> for GenericWkbArray<i64>
impl TryFrom<(&dyn Array, WkbType)> for GenericWkbArray<i64>
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§impl TryFrom<GenericWkbArray<i64>> for GenericWkbArray<i32>
impl TryFrom<GenericWkbArray<i64>> for GenericWkbArray<i32>
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§fn try_from(value: GenericWkbArray<i64>) -> GeoArrowResult<Self>
fn try_from(value: GenericWkbArray<i64>) -> GeoArrowResult<Self>
Performs the conversion.
impl GenericWkbArrayType<'_> for GenericWkbArray<i32>
impl GenericWkbArrayType<'_> for GenericWkbArray<i64>
impl<O: OffsetSizeTrait> StructuralPartialEq for GenericWkbArray<O>
Auto Trait Implementations§
impl<O> Freeze for GenericWkbArray<O>
impl<O> RefUnwindSafe for GenericWkbArray<O>where
O: RefUnwindSafe,
impl<O> Send for GenericWkbArray<O>
impl<O> Sync for GenericWkbArray<O>
impl<O> Unpin for GenericWkbArray<O>where
O: Unpin,
impl<O> UnwindSafe for GenericWkbArray<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToGeo for Twhere
T: GeozeroGeometry,
impl<T> ToGeo for Twhere
T: GeozeroGeometry,
Source§impl<T> ToGeometryArray for Twhere
T: GeozeroGeometry,
impl<T> ToGeometryArray for Twhere
T: GeozeroGeometry,
Source§fn to_geometry_builder(
&self,
typ: GeometryType,
) -> Result<GeometryBuilder, GeozeroError>
fn to_geometry_builder( &self, typ: GeometryType, ) -> Result<GeometryBuilder, GeozeroError>
Available on crate feature
geozero
only.Convert to a GeoArrow
GeometryBuilder
Source§fn to_geometry_array(&self, typ: GeometryType) -> Result<GeometryArray>
fn to_geometry_array(&self, typ: GeometryType) -> Result<GeometryArray>
Available on crate feature
geozero
only.Convert to GeoArrow
GeometryArray
Source§impl<T> ToJson for Twhere
T: GeozeroGeometry,
impl<T> ToJson for Twhere
T: GeozeroGeometry,
Source§impl<T> ToLineStringArray for Twhere
T: GeozeroGeometry,
impl<T> ToLineStringArray for Twhere
T: GeozeroGeometry,
Source§fn to_line_string_builder(
&self,
typ: LineStringType,
) -> Result<LineStringBuilder, GeozeroError>
fn to_line_string_builder( &self, typ: LineStringType, ) -> Result<LineStringBuilder, GeozeroError>
Available on crate feature
geozero
only.Convert to a GeoArrow LineStringBuilder
Source§fn to_line_string_array(&self, typ: LineStringType) -> Result<LineStringArray>
fn to_line_string_array(&self, typ: LineStringType) -> Result<LineStringArray>
Available on crate feature
geozero
only.Convert to GeoArrow LineStringArray
Source§impl<T> ToMultiLineStringArray for Twhere
T: GeozeroGeometry,
impl<T> ToMultiLineStringArray for Twhere
T: GeozeroGeometry,
Source§fn to_multi_line_string_builder(
&self,
typ: MultiLineStringType,
) -> Result<MultiLineStringBuilder, GeozeroError>
fn to_multi_line_string_builder( &self, typ: MultiLineStringType, ) -> Result<MultiLineStringBuilder, GeozeroError>
Available on crate feature
geozero
only.Convert to a GeoArrow MultiLineStringBuilder
Source§fn to_multi_line_string_array(
&self,
typ: MultiLineStringType,
) -> Result<MultiLineStringArray>
fn to_multi_line_string_array( &self, typ: MultiLineStringType, ) -> Result<MultiLineStringArray>
Available on crate feature
geozero
only.Convert to GeoArrow MultiLineStringArray
Source§impl<T> ToMultiPointArray for Twhere
T: GeozeroGeometry,
impl<T> ToMultiPointArray for Twhere
T: GeozeroGeometry,
Source§fn to_multi_point_builder(
&self,
typ: MultiPointType,
) -> Result<MultiPointBuilder, GeozeroError>
fn to_multi_point_builder( &self, typ: MultiPointType, ) -> Result<MultiPointBuilder, GeozeroError>
Available on crate feature
geozero
only.Convert to a GeoArrow MultiPointBuilder
Source§fn to_multi_point_array(&self, typ: MultiPointType) -> Result<MultiPointArray>
fn to_multi_point_array(&self, typ: MultiPointType) -> Result<MultiPointArray>
Available on crate feature
geozero
only.Convert to GeoArrow MultiPointArray
Source§impl<T> ToMultiPolygonArray for Twhere
T: GeozeroGeometry,
impl<T> ToMultiPolygonArray for Twhere
T: GeozeroGeometry,
Source§fn to_multi_polygon_array(
&self,
typ: MultiPolygonType,
) -> Result<MultiPolygonArray, GeozeroError>
fn to_multi_polygon_array( &self, typ: MultiPolygonType, ) -> Result<MultiPolygonArray, GeozeroError>
Available on crate feature
geozero
only.Convert to GeoArrow MultiPolygonArray
Source§fn to_multi_polygon_builder(
&self,
typ: MultiPolygonType,
) -> Result<MultiPolygonBuilder, GeozeroError>
fn to_multi_polygon_builder( &self, typ: MultiPolygonType, ) -> Result<MultiPolygonBuilder, GeozeroError>
Available on crate feature
geozero
only.Convert to a GeoArrow MultiPolygonBuilder
Source§impl<T> ToPointArray for Twhere
T: GeozeroGeometry,
impl<T> ToPointArray for Twhere
T: GeozeroGeometry,
Source§fn to_point_builder(&self, typ: PointType) -> Result<PointBuilder, GeozeroError>
fn to_point_builder(&self, typ: PointType) -> Result<PointBuilder, GeozeroError>
Available on crate feature
geozero
only.Convert to a GeoArrow PointBuilder
Source§fn to_point_array(&self, typ: PointType) -> Result<PointArray>
fn to_point_array(&self, typ: PointType) -> Result<PointArray>
Available on crate feature
geozero
only.Convert to GeoArrow PointArray
Source§impl<T> ToPolygonArray for Twhere
T: GeozeroGeometry,
impl<T> ToPolygonArray for Twhere
T: GeozeroGeometry,
Source§fn to_polygon_builder(
&self,
typ: PolygonType,
) -> Result<PolygonBuilder, GeozeroError>
fn to_polygon_builder( &self, typ: PolygonType, ) -> Result<PolygonBuilder, GeozeroError>
Available on crate feature
geozero
only.Convert to a GeoArrow PolygonBuilder
Source§fn to_polygon_array(&self, typ: PolygonType) -> Result<PolygonArray>
fn to_polygon_array(&self, typ: PolygonType) -> Result<PolygonArray>
Available on crate feature
geozero
only.Convert to GeoArrow PolygonArray
Source§impl<T> ToSvg for Twhere
T: GeozeroGeometry,
impl<T> ToSvg for Twhere
T: GeozeroGeometry,
Source§fn to_svg_document(&self) -> Result<String, GeozeroError>
fn to_svg_document(&self) -> Result<String, GeozeroError>
Convert to SVG document.
Source§impl<T> ToWkt for Twhere
T: GeozeroGeometry,
impl<T> ToWkt for Twhere
T: GeozeroGeometry,
Source§fn to_wkt_ndim(&self, dims: CoordDimensions) -> Result<String, GeozeroError>
fn to_wkt_ndim(&self, dims: CoordDimensions) -> Result<String, GeozeroError>
Convert to WKT String with dimensions.
Source§fn to_wkt_with_opts(
&self,
dialect: WktDialect,
dims: CoordDimensions,
srid: Option<i32>,
) -> Result<String, GeozeroError>
fn to_wkt_with_opts( &self, dialect: WktDialect, dims: CoordDimensions, srid: Option<i32>, ) -> Result<String, GeozeroError>
Convert to WKT String with srid, dimensions and dialect.