pub struct WKBArray<O: OffsetSizeTrait>(/* private fields */);
Expand description
An immutable array of WKB geometries using GeoArrow’s in-memory representation.
This is semantically equivalent to Vec<Option<WKB>>
due to the internal validity bitmap.
This array can be used directly for operations, but that will incur costly encoding to and
from WKB on every operation. Instead, you usually want to use the WKBArray only for
serialization purposes (e.g. to and from GeoParquet) but convert to
strongly-typed arrays (such as the PointArray
) for computations.
Implementations§
source§impl<O: OffsetSizeTrait> WKBArray<O>
impl<O: OffsetSizeTrait> WKBArray<O>
source§impl<O: OffsetSizeTrait> WKBArray<O>
impl<O: OffsetSizeTrait> WKBArray<O>
sourcepub fn iter_geo_values(&self) -> impl Iterator<Item = Geometry> + '_
pub fn iter_geo_values(&self) -> impl Iterator<Item = Geometry> + '_
Iterator over geo Geometry objects, not looking at validity
sourcepub fn iter_geo(
&self
) -> ZipValidity<Geometry, impl Iterator<Item = Geometry> + '_, BitIterator<'_>> ⓘ
pub fn iter_geo( &self ) -> ZipValidity<Geometry, impl Iterator<Item = Geometry> + '_, BitIterator<'_>> ⓘ
Iterator over geo Geometry objects, taking into account validity
Trait Implementations§
source§impl<O: OffsetSizeTrait> AffineOps<AffineTransform> for WKBArray<O>
impl<O: OffsetSizeTrait> AffineOps<AffineTransform> for WKBArray<O>
source§fn affine_transform(&self, transform: &AffineTransform) -> Self
fn affine_transform(&self, transform: &AffineTransform) -> Self
Apply
transform
immutably, outputting a new geometry.source§impl<O: OffsetSizeTrait> AffineOps<Vec<AffineTransform>> for WKBArray<O>
impl<O: OffsetSizeTrait> AffineOps<Vec<AffineTransform>> for WKBArray<O>
source§fn affine_transform(&self, transform: &Vec<AffineTransform>) -> Self
fn affine_transform(&self, transform: &Vec<AffineTransform>) -> Self
Apply
transform
immutably, outputting a new geometry.source§impl<O: OffsetSizeTrait> Area for WKBArray<O>
impl<O: OffsetSizeTrait> Area for WKBArray<O>
fn signed_area(&self) -> Float64Array
fn unsigned_area(&self) -> Float64Array
source§impl<O: OffsetSizeTrait> BoundingRect for WKBArray<O>
impl<O: OffsetSizeTrait> BoundingRect for WKBArray<O>
source§fn bounding_rect(&self) -> RectArray
fn bounding_rect(&self) -> RectArray
Return the bounding rectangle of a geometry Read more
source§impl<O: OffsetSizeTrait> Center for WKBArray<O>
impl<O: OffsetSizeTrait> Center for WKBArray<O>
fn center(&self) -> PointArray
source§impl<O: OffsetSizeTrait> Centroid for WKBArray<O>
impl<O: OffsetSizeTrait> Centroid for WKBArray<O>
source§fn centroid(&self) -> PointArray
fn centroid(&self) -> PointArray
source§impl<O: OffsetSizeTrait> ChamberlainDuquetteArea for WKBArray<O>
impl<O: OffsetSizeTrait> ChamberlainDuquetteArea for WKBArray<O>
fn chamberlain_duquette_signed_area(&self) -> Float64Array
fn chamberlain_duquette_unsigned_area(&self) -> Float64Array
source§impl<O: OffsetSizeTrait> ConvexHull<O> for WKBArray<O>
impl<O: OffsetSizeTrait> ConvexHull<O> for WKBArray<O>
fn convex_hull(&self) -> PolygonArray<O>
source§impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&GeometryCollectionArray<A>> for WKBArray<B>
impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&GeometryCollectionArray<A>> for WKBArray<B>
source§fn from(value: &GeometryCollectionArray<A>) -> Self
fn from(value: &GeometryCollectionArray<A>) -> Self
Converts to this type from the input type.
source§impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&LineStringArray<A>> for WKBArray<B>
impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&LineStringArray<A>> for WKBArray<B>
source§fn from(value: &LineStringArray<A>) -> Self
fn from(value: &LineStringArray<A>) -> Self
Converts to this type from the input type.
source§impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&MultiLineStringArray<A>> for WKBArray<B>
impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&MultiLineStringArray<A>> for WKBArray<B>
source§fn from(value: &MultiLineStringArray<A>) -> Self
fn from(value: &MultiLineStringArray<A>) -> Self
Converts to this type from the input type.
source§impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&MultiPointArray<A>> for WKBArray<B>
impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&MultiPointArray<A>> for WKBArray<B>
source§fn from(value: &MultiPointArray<A>) -> Self
fn from(value: &MultiPointArray<A>) -> Self
Converts to this type from the input type.
source§impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&MultiPolygonArray<A>> for WKBArray<B>
impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&MultiPolygonArray<A>> for WKBArray<B>
source§fn from(value: &MultiPolygonArray<A>) -> Self
fn from(value: &MultiPolygonArray<A>) -> Self
Converts to this type from the input type.
source§impl<O: OffsetSizeTrait> From<&PointArray> for WKBArray<O>
impl<O: OffsetSizeTrait> From<&PointArray> for WKBArray<O>
source§fn from(value: &PointArray) -> Self
fn from(value: &PointArray) -> Self
Converts to this type from the input type.
source§impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&PolygonArray<A>> for WKBArray<B>
impl<A: OffsetSizeTrait, B: OffsetSizeTrait> From<&PolygonArray<A>> for WKBArray<B>
source§fn from(value: &PolygonArray<A>) -> Self
fn from(value: &PolygonArray<A>) -> Self
Converts to this type from the input type.
source§impl<O: OffsetSizeTrait> From<GenericByteArray<GenericBinaryType<O>>> for WKBArray<O>
impl<O: OffsetSizeTrait> From<GenericByteArray<GenericBinaryType<O>>> for WKBArray<O>
source§fn from(value: GenericBinaryArray<O>) -> Self
fn from(value: GenericBinaryArray<O>) -> Self
Converts to this type from the input type.
source§impl<O: OffsetSizeTrait> From<MutableWKBArray<O>> for WKBArray<O>
impl<O: OffsetSizeTrait> From<MutableWKBArray<O>> for WKBArray<O>
source§fn from(other: MutableWKBArray<O>) -> Self
fn from(other: MutableWKBArray<O>) -> Self
Converts to this type from the input type.
source§impl<'a, O: OffsetSizeTrait> GeoArrayAccessor<'a> for WKBArray<O>
impl<'a, O: OffsetSizeTrait> GeoArrayAccessor<'a> for WKBArray<O>
§type Item = WKB<'a, O>
type Item = WKB<'a, O>
The geoarrow scalar object for this geometry array type.
source§unsafe fn value_unchecked(&'a self, index: usize) -> Self::Item
unsafe fn value_unchecked(&'a self, index: usize) -> Self::Item
Returns the element at index
i
Read moresource§fn get(&'a self, index: usize) -> Option<Self::Item>
fn get(&'a self, index: usize) -> Option<Self::Item>
Access the value at slot
i
as an Arrow scalar, considering validity.source§impl<O: OffsetSizeTrait> GeodesicArea for WKBArray<O>
impl<O: OffsetSizeTrait> GeodesicArea for WKBArray<O>
source§fn geodesic_perimeter(&self) -> Float64Array
fn geodesic_perimeter(&self) -> Float64Array
Determine the perimeter of a geometry on an ellipsoidal model of the earth. Read more
source§fn geodesic_area_signed(&self) -> Float64Array
fn geodesic_area_signed(&self) -> Float64Array
Determine the area of a geometry on an ellipsoidal model of the earth. Read more
source§fn geodesic_area_unsigned(&self) -> Float64Array
fn geodesic_area_unsigned(&self) -> Float64Array
Determine the area of a geometry on an ellipsoidal model of the earth. Supports very large geometries that cover a significant portion of the earth. Read more
source§fn geodesic_perimeter_area_signed(&self) -> (Float64Array, Float64Array)
fn geodesic_perimeter_area_signed(&self) -> (Float64Array, Float64Array)
Determine the perimeter and area of a geometry on an ellipsoidal model of the earth, all in one operation. Read more
source§fn geodesic_perimeter_area_unsigned(&self) -> (Float64Array, Float64Array)
fn geodesic_perimeter_area_unsigned(&self) -> (Float64Array, Float64Array)
Determine the perimeter and area of a geometry on an ellipsoidal model of the earth, all in one operation. Supports very large geometries that cover a significant portion of the earth. Read more
source§impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for WKBArray<O>
impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for WKBArray<O>
source§fn validity(&self) -> Option<&NullBuffer>
fn validity(&self) -> Option<&NullBuffer>
Returns the optional validity.
source§fn data_type(&self) -> &GeoDataType
fn data_type(&self) -> &GeoDataType
source§fn storage_type(&self) -> DataType
fn storage_type(&self) -> DataType
Get the logical DataType of this array.
source§fn extension_field(&self) -> Arc<Field>
fn extension_field(&self) -> Arc<Field>
Get the extension type of this array, as defined by the GeoArrow
specification. Read more
source§fn extension_name(&self) -> &str
fn extension_name(&self) -> &str
Get the extension name of this array.
source§fn into_array_ref(self) -> Arc<dyn Array>
fn into_array_ref(self) -> Arc<dyn Array>
source§fn with_coords(self, _coords: CoordBuffer) -> Self
fn with_coords(self, _coords: CoordBuffer) -> Self
Create a new array with replaced coordinates Read more
source§fn coord_type(&self) -> CoordType
fn coord_type(&self) -> CoordType
Get the coordinate type of this geometry array, either interleaved or separated.
source§fn into_coord_type(self, _coord_type: CoordType) -> Self
fn into_coord_type(self, _coord_type: CoordType) -> Self
Cast the coordinate buffer of this geometry array to the given coordinate type.
source§fn owned_slice(&self, _offset: usize, _length: usize) -> Self
fn owned_slice(&self, _offset: usize, _length: usize) -> Self
A slice that fully copies the contents of the underlying buffer
fn nulls(&self) -> Option<&NullBuffer>
fn logical_nulls(&self) -> Option<NullBuffer>
source§fn null_count(&self) -> usize
fn null_count(&self) -> usize
The number of null slots in this array. Read more
source§impl<O: OffsetSizeTrait> HasDimensions for WKBArray<O>
impl<O: OffsetSizeTrait> HasDimensions for WKBArray<O>
source§fn is_empty(&self) -> BooleanArray
fn is_empty(&self) -> BooleanArray
source§impl<O: OffsetSizeTrait> IntoArrow for WKBArray<O>
impl<O: OffsetSizeTrait> IntoArrow for WKBArray<O>
type ArrowArray = GenericByteArray<GenericBinaryType<O>>
fn into_arrow(self) -> Self::ArrowArray
source§impl<O: PartialEq + OffsetSizeTrait> PartialEq for WKBArray<O>
impl<O: PartialEq + OffsetSizeTrait> PartialEq for WKBArray<O>
source§impl<'a, O: OffsetSizeTrait> RTree<'a> for WKBArray<O>
impl<'a, O: OffsetSizeTrait> RTree<'a> for WKBArray<O>
§type RTreeObject = CachedEnvelope<WKB<'a, O>>
type RTreeObject = CachedEnvelope<WKB<'a, O>>
The object type to store in the RTree.
source§fn rstar_tree(&'a self) -> RTree<Self::RTreeObject>
fn rstar_tree(&'a self) -> RTree<Self::RTreeObject>
Build an
RTree
spatial index containing this array’s geometries.source§impl<O: OffsetSizeTrait> Rotate<PrimitiveArray<Float64Type>> for WKBArray<O>
impl<O: OffsetSizeTrait> Rotate<PrimitiveArray<Float64Type>> for WKBArray<O>
source§fn rotate_around_centroid(&self, degrees: &Float64Array) -> WKBArray<O>
fn rotate_around_centroid(&self, degrees: &Float64Array) -> WKBArray<O>
source§fn rotate_around_center(&self, degrees: &Float64Array) -> Self
fn rotate_around_center(&self, degrees: &Float64Array) -> Self
Rotate a geometry around the center of its bounding
box by an angle, in degrees. Read more
source§fn rotate_around_point(&self, degrees: &Float64Array, point: Point) -> Self
fn rotate_around_point(&self, degrees: &Float64Array, point: Point) -> Self
Rotate a Geometry around an arbitrary point by an angle, given in degrees Read more
source§impl<O: OffsetSizeTrait> Rotate<f64> for WKBArray<O>
impl<O: OffsetSizeTrait> Rotate<f64> for WKBArray<O>
source§fn rotate_around_centroid(&self, degrees: &f64) -> WKBArray<O>
fn rotate_around_centroid(&self, degrees: &f64) -> WKBArray<O>
source§fn rotate_around_center(&self, degrees: &f64) -> Self
fn rotate_around_center(&self, degrees: &f64) -> Self
Rotate a geometry around the center of its bounding
box by an angle, in degrees. Read more
source§fn rotate_around_point(&self, degrees: &f64, point: Point) -> Self
fn rotate_around_point(&self, degrees: &f64, point: Point) -> Self
Rotate a Geometry around an arbitrary point by an angle, given in degrees Read more
source§impl<O: OffsetSizeTrait> Scale for WKBArray<O>
impl<O: OffsetSizeTrait> Scale for WKBArray<O>
source§fn scale(&self, scale_factor: BroadcastablePrimitive<Float64Type>) -> Self
fn scale(&self, scale_factor: BroadcastablePrimitive<Float64Type>) -> Self
Scale geometries from its bounding box center. Read more
source§fn scale_xy(
&self,
x_factor: BroadcastablePrimitive<Float64Type>,
y_factor: BroadcastablePrimitive<Float64Type>
) -> Self
fn scale_xy( &self, x_factor: BroadcastablePrimitive<Float64Type>, y_factor: BroadcastablePrimitive<Float64Type> ) -> Self
Scale geometries from its bounding box center, using different values for
x_factor
and
y_factor
to distort the geometry’s aspect ratio. Read moresource§fn scale_around_point(
&self,
x_factor: BroadcastablePrimitive<Float64Type>,
y_factor: BroadcastablePrimitive<Float64Type>,
origin: Point
) -> Self
fn scale_around_point( &self, x_factor: BroadcastablePrimitive<Float64Type>, y_factor: BroadcastablePrimitive<Float64Type>, origin: Point ) -> Self
Scale geometries around a point of
origin
. Read moresource§impl<O: OffsetSizeTrait> Skew for WKBArray<O>
impl<O: OffsetSizeTrait> Skew for WKBArray<O>
source§fn skew(&self, scale_factor: BroadcastablePrimitive<Float64Type>) -> Self
fn skew(&self, scale_factor: BroadcastablePrimitive<Float64Type>) -> Self
An affine transformation which skews a geometry, sheared by a uniform angle along the x and
y dimensions. Read more
source§fn skew_xy(
&self,
x_factor: BroadcastablePrimitive<Float64Type>,
y_factor: BroadcastablePrimitive<Float64Type>
) -> Self
fn skew_xy( &self, x_factor: BroadcastablePrimitive<Float64Type>, y_factor: BroadcastablePrimitive<Float64Type> ) -> Self
An affine transformation which skews a geometry, sheared by an angle along the x and y dimensions. Read more
source§fn skew_around_point(
&self,
x_factor: BroadcastablePrimitive<Float64Type>,
y_factor: BroadcastablePrimitive<Float64Type>,
origin: Point
) -> Self
fn skew_around_point( &self, x_factor: BroadcastablePrimitive<Float64Type>, y_factor: BroadcastablePrimitive<Float64Type>, origin: Point ) -> Self
An affine transformation which skews a geometry around a point of
origin
, sheared by an
angle along the x and y dimensions. Read moresource§impl<O: OffsetSizeTrait> Translate for WKBArray<O>
impl<O: OffsetSizeTrait> Translate for WKBArray<O>
source§fn translate(
&self,
x_offset: BroadcastablePrimitive<Float64Type>,
y_offset: BroadcastablePrimitive<Float64Type>
) -> Self
fn translate( &self, x_offset: BroadcastablePrimitive<Float64Type>, y_offset: BroadcastablePrimitive<Float64Type> ) -> Self
Translate a Geometry along its axes by the given offsets Read more
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for GeometryArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for GeometryArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for LineStringArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for LineStringArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MultiLineStringArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MultiLineStringArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MultiPointArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MultiPointArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MultiPolygonArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MultiPolygonArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutableLineStringArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutableLineStringArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutableMixedGeometryArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutableMixedGeometryArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutableMultiLineStringArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutableMultiLineStringArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutableMultiPointArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutableMultiPointArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutableMultiPolygonArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutableMultiPolygonArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutablePointArray
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutablePointArray
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutablePolygonArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for MutablePolygonArray<O>
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for PointArray
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for PointArray
source§impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for PolygonArray<O>
impl<O: OffsetSizeTrait> TryFrom<WKBArray<O>> for PolygonArray<O>
source§impl<O: OffsetSizeTrait> TypeIds for WKBArray<O>
impl<O: OffsetSizeTrait> TypeIds for WKBArray<O>
impl<O: OffsetSizeTrait> StructuralPartialEq for WKBArray<O>
Auto Trait Implementations§
impl<O> RefUnwindSafe for WKBArray<O>where
O: RefUnwindSafe,
impl<O> Send for WKBArray<O>
impl<O> Sync for WKBArray<O>
impl<O> Unpin for WKBArray<O>where
O: Unpin,
impl<O> UnwindSafe for WKBArray<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