pub enum GeometryArray<O: OffsetSizeTrait> {
Point(PointArray),
LineString(LineStringArray<O>),
Polygon(PolygonArray<O>),
MultiPoint(MultiPointArray<O>),
MultiLineString(MultiLineStringArray<O>),
MultiPolygon(MultiPolygonArray<O>),
Rect(RectArray),
}
Expand description
A GeometryArray is an enum over the various underlying zero copy GeoArrow array types.
Notably this does not include WKBArray
as a variant, because that is not zero-copy to
parse.
Variants§
Point(PointArray)
LineString(LineStringArray<O>)
Polygon(PolygonArray<O>)
MultiPoint(MultiPointArray<O>)
MultiLineString(MultiLineStringArray<O>)
MultiPolygon(MultiPolygonArray<O>)
Rect(RectArray)
Trait Implementations§
Source§impl<O: OffsetSizeTrait> AffineOps<AffineTransform> for GeometryArray<O>
impl<O: OffsetSizeTrait> AffineOps<AffineTransform> for GeometryArray<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 GeometryArray<O>
impl<O: OffsetSizeTrait> AffineOps<Vec<AffineTransform>> for GeometryArray<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 GeometryArray<O>
impl<O: OffsetSizeTrait> Area for GeometryArray<O>
fn signed_area(&self) -> Float64Array
fn unsigned_area(&self) -> Float64Array
Source§impl<O: OffsetSizeTrait> BoundingRect for GeometryArray<O>
impl<O: OffsetSizeTrait> BoundingRect for GeometryArray<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 GeometryArray<O>
impl<O: OffsetSizeTrait> Center for GeometryArray<O>
fn center(&self) -> PointArray
Source§impl<O: OffsetSizeTrait> Centroid for GeometryArray<O>
impl<O: OffsetSizeTrait> Centroid for GeometryArray<O>
Source§fn centroid(&self) -> PointArray
fn centroid(&self) -> PointArray
Source§impl<O: OffsetSizeTrait> ChamberlainDuquetteArea for GeometryArray<O>
impl<O: OffsetSizeTrait> ChamberlainDuquetteArea for GeometryArray<O>
fn chamberlain_duquette_signed_area(&self) -> Float64Array
fn chamberlain_duquette_unsigned_area(&self) -> Float64Array
Source§impl<O: Clone + OffsetSizeTrait> Clone for GeometryArray<O>
impl<O: Clone + OffsetSizeTrait> Clone for GeometryArray<O>
Source§fn clone(&self) -> GeometryArray<O>
fn clone(&self) -> GeometryArray<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: OffsetSizeTrait> ConvexHull<O> for GeometryArray<O>
impl<O: OffsetSizeTrait> ConvexHull<O> for GeometryArray<O>
fn convex_hull(&self) -> PolygonArray<O>
Source§impl<O: Debug + OffsetSizeTrait> Debug for GeometryArray<O>
impl<O: Debug + OffsetSizeTrait> Debug for GeometryArray<O>
Source§impl From<GeometryArray<i32>> for GeometryArray<i64>
impl From<GeometryArray<i32>> for GeometryArray<i64>
Source§fn from(value: GeometryArray<i32>) -> Self
fn from(value: GeometryArray<i32>) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> From<LineStringArray<O>> for GeometryArray<O>
impl<O: OffsetSizeTrait> From<LineStringArray<O>> for GeometryArray<O>
Source§fn from(value: LineStringArray<O>) -> Self
fn from(value: LineStringArray<O>) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> From<MultiLineStringArray<O>> for GeometryArray<O>
impl<O: OffsetSizeTrait> From<MultiLineStringArray<O>> for GeometryArray<O>
Source§fn from(value: MultiLineStringArray<O>) -> Self
fn from(value: MultiLineStringArray<O>) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> From<MultiPointArray<O>> for GeometryArray<O>
impl<O: OffsetSizeTrait> From<MultiPointArray<O>> for GeometryArray<O>
Source§fn from(value: MultiPointArray<O>) -> Self
fn from(value: MultiPointArray<O>) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> From<MultiPolygonArray<O>> for GeometryArray<O>
impl<O: OffsetSizeTrait> From<MultiPolygonArray<O>> for GeometryArray<O>
Source§fn from(value: MultiPolygonArray<O>) -> Self
fn from(value: MultiPolygonArray<O>) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> From<PointArray> for GeometryArray<O>
impl<O: OffsetSizeTrait> From<PointArray> for GeometryArray<O>
Source§fn from(value: PointArray) -> Self
fn from(value: PointArray) -> Self
Converts to this type from the input type.
Source§impl<O: OffsetSizeTrait> From<PolygonArray<O>> for GeometryArray<O>
impl<O: OffsetSizeTrait> From<PolygonArray<O>> for GeometryArray<O>
Source§fn from(value: PolygonArray<O>) -> Self
fn from(value: PolygonArray<O>) -> Self
Converts to this type from the input type.
Source§impl<'a, O: OffsetSizeTrait> GeoArrayAccessor<'a> for GeometryArray<O>
impl<'a, O: OffsetSizeTrait> GeoArrayAccessor<'a> for GeometryArray<O>
Source§type Item = Geometry<'a, O>
type Item = Geometry<'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 GeometryArray<O>
impl<O: OffsetSizeTrait> GeodesicArea for GeometryArray<O>
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(&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_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 GeometryArray<O>
impl<'a, O: OffsetSizeTrait> GeometryArrayTrait<'a> for GeometryArray<O>
Source§fn len(&self) -> usize
fn len(&self) -> usize
The length of the GeometryArray
. Every array has a length corresponding to the number
of geometries it contains.
Source§fn validity(&self) -> Option<&NullBuffer>
fn validity(&self) -> Option<&NullBuffer>
The validity of the GeometryArray
: every array has an optional [Bitmap
] that, when
available specifies whether the geometry at a given slot is valid or not (null). When the
validity is None
, all slots are valid.
Source§fn slice(&self, offset: usize, length: usize) -> Self
fn slice(&self, offset: usize, length: usize) -> Self
Slices the GeometryArray
in place
§Implementation
This operation is O(1)
over len
, as it amounts to increase two ref counts
and moving the struct to the heap.
§Panic
This function panics iff offset + length > self.len()
.
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 GeometryArray<O>
impl<O: OffsetSizeTrait> HasDimensions for GeometryArray<O>
Source§fn is_empty(&self) -> BooleanArray
fn is_empty(&self) -> BooleanArray
Source§impl<O: OffsetSizeTrait> IntoArrow for GeometryArray<O>
impl<O: OffsetSizeTrait> IntoArrow for GeometryArray<O>
type ArrowArray = Arc<dyn Array>
fn into_arrow(self) -> Self::ArrowArray
Source§impl<O: OffsetSizeTrait> MinimumRotatedRect<i32> for GeometryArray<O>
impl<O: OffsetSizeTrait> MinimumRotatedRect<i32> for GeometryArray<O>
fn minimum_rotated_rect(&self) -> PolygonArray<i32>
Source§impl<O: OffsetSizeTrait> RemoveRepeatedPoints for GeometryArray<O>
impl<O: OffsetSizeTrait> RemoveRepeatedPoints for GeometryArray<O>
Source§fn remove_repeated_points(&self) -> Self
fn remove_repeated_points(&self) -> Self
Create a new geometry with (consecutive) repeated points removed.
Source§impl<O: OffsetSizeTrait> Rotate<PrimitiveArray<Float64Type>> for GeometryArray<O>
impl<O: OffsetSizeTrait> Rotate<PrimitiveArray<Float64Type>> for GeometryArray<O>
Source§fn rotate_around_centroid(&self, degrees: &Float64Array) -> Self
fn rotate_around_centroid(&self, degrees: &Float64Array) -> Self
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 GeometryArray<O>
impl<O: OffsetSizeTrait> Rotate<f64> for GeometryArray<O>
Source§fn rotate_around_centroid(&self, degrees: &f64) -> Self
fn rotate_around_centroid(&self, degrees: &f64) -> Self
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§impl<O: OffsetSizeTrait> Scale for GeometryArray<O>
impl<O: OffsetSizeTrait> Scale for GeometryArray<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> Simplify for GeometryArray<O>
impl<O: OffsetSizeTrait> Simplify for GeometryArray<O>
Source§impl<O: OffsetSizeTrait> SimplifyVw for GeometryArray<O>
impl<O: OffsetSizeTrait> SimplifyVw for GeometryArray<O>
Source§fn simplify_vw(&self, epsilon: &f64) -> Self
fn simplify_vw(&self, epsilon: &f64) -> Self
Returns the simplified representation of a geometry, using the Visvalingam-Whyatt algorithm Read more
Source§impl<O: OffsetSizeTrait> Skew for GeometryArray<O>
impl<O: OffsetSizeTrait> Skew for GeometryArray<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 GeometryArray<O>
impl<O: OffsetSizeTrait> Translate for GeometryArray<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 TryFrom<GeometryArray<i64>> for GeometryArray<i32>
impl TryFrom<GeometryArray<i64>> for GeometryArray<i32>
Auto Trait Implementations§
impl<O> Freeze for GeometryArray<O>
impl<O> RefUnwindSafe for GeometryArray<O>where
O: RefUnwindSafe,
impl<O> Send for GeometryArray<O>
impl<O> Sync for GeometryArray<O>
impl<O> Unpin for GeometryArray<O>where
O: Unpin,
impl<O> UnwindSafe for GeometryArray<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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more