pub struct MultiPolygonArray { /* private fields */ }
Expand description
An immutable array of MultiPolygon geometries.
This is semantically equivalent to Vec<Option<MultiPolygon>>
due to the internal validity
bitmap.
Implementations§
Source§impl MultiPolygonArray
impl MultiPolygonArray
Sourcepub fn new(
coords: CoordBuffer,
geom_offsets: OffsetBuffer<i32>,
polygon_offsets: OffsetBuffer<i32>,
ring_offsets: OffsetBuffer<i32>,
nulls: Option<NullBuffer>,
metadata: Arc<Metadata>,
) -> Self
pub fn new( coords: CoordBuffer, geom_offsets: OffsetBuffer<i32>, polygon_offsets: OffsetBuffer<i32>, ring_offsets: OffsetBuffer<i32>, nulls: Option<NullBuffer>, metadata: Arc<Metadata>, ) -> Self
Create a new MultiPolygonArray from parts
§Implementation
This function is O(1)
.
§Panics
- if the nulls is not
None
and its length is different from the number of geometries - if the largest ring offset does not match the number of coordinates
- if the largest polygon offset does not match the size of ring offsets
- if the largest geometry offset does not match the size of polygon offsets
Sourcepub fn try_new(
coords: CoordBuffer,
geom_offsets: OffsetBuffer<i32>,
polygon_offsets: OffsetBuffer<i32>,
ring_offsets: OffsetBuffer<i32>,
nulls: Option<NullBuffer>,
metadata: Arc<Metadata>,
) -> GeoArrowResult<Self>
pub fn try_new( coords: CoordBuffer, geom_offsets: OffsetBuffer<i32>, polygon_offsets: OffsetBuffer<i32>, ring_offsets: OffsetBuffer<i32>, nulls: Option<NullBuffer>, metadata: Arc<Metadata>, ) -> GeoArrowResult<Self>
Create a new MultiPolygonArray from parts
§Implementation
This function is O(1)
.
§Errors
- if the nulls is not
None
and its length is different from the number of geometries - if the largest ring offset does not match the number of coordinates
- if the largest polygon offset does not match the size of ring offsets
- if the largest geometry offset does not match the size of polygon offsets
Sourcepub fn coords(&self) -> &CoordBuffer
pub fn coords(&self) -> &CoordBuffer
Access the underlying coordinate buffer
Sourcepub fn geom_offsets(&self) -> &OffsetBuffer<i32>
pub fn geom_offsets(&self) -> &OffsetBuffer<i32>
Access the underlying geometry offsets buffer
Sourcepub fn polygon_offsets(&self) -> &OffsetBuffer<i32>
pub fn polygon_offsets(&self) -> &OffsetBuffer<i32>
Access the underlying polygon offsets buffer
Sourcepub fn ring_offsets(&self) -> &OffsetBuffer<i32>
pub fn ring_offsets(&self) -> &OffsetBuffer<i32>
Access the underlying ring offsets buffer
Sourcepub fn buffer_lengths(&self) -> MultiPolygonCapacity
pub fn buffer_lengths(&self) -> MultiPolygonCapacity
The lengths of each buffer contained in this array.
Sourcepub fn into_coord_type(self, coord_type: CoordType) -> Self
pub fn into_coord_type(self, coord_type: CoordType) -> Self
Change the CoordType
of this array.
Sourcepub fn with_metadata(self, metadata: Arc<Metadata>) -> Self
pub fn with_metadata(self, metadata: Arc<Metadata>) -> Self
Change the Metadata
of this array.
Trait Implementations§
Source§impl Clone for MultiPolygonArray
impl Clone for MultiPolygonArray
Source§fn clone(&self) -> MultiPolygonArray
fn clone(&self) -> MultiPolygonArray
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 Debug for MultiPolygonArray
impl Debug for MultiPolygonArray
Source§impl From<MultiPolygonArray> for GeometryArray
impl From<MultiPolygonArray> for GeometryArray
Source§fn from(value: MultiPolygonArray) -> Self
fn from(value: MultiPolygonArray) -> Self
Converts to this type from the input type.
Source§impl From<PolygonArray> for MultiPolygonArray
impl From<PolygonArray> for MultiPolygonArray
Source§fn from(value: PolygonArray) -> Self
fn from(value: PolygonArray) -> Self
Converts to this type from the input type.
Source§impl GeoArrowArray for MultiPolygonArray
impl GeoArrowArray for MultiPolygonArray
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> GeoArrowArrayAccessor<'a> for MultiPolygonArray
impl<'a> GeoArrowArrayAccessor<'a> for MultiPolygonArray
Source§type Item = MultiPolygon<'a>
type Item = MultiPolygon<'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 IntoArrow for MultiPolygonArray
impl IntoArrow for MultiPolygonArray
Source§type ArrowArray = GenericListArray<i32>
type ArrowArray = GenericListArray<i32>
The type of arrow array that this geoarrow array can be converted into.
Source§type ExtensionType = MultiPolygonType
type ExtensionType = MultiPolygonType
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 PartialEq for MultiPolygonArray
impl PartialEq for MultiPolygonArray
Source§impl TryFrom<(&GenericListArray<i32>, MultiPolygonType)> for MultiPolygonArray
impl TryFrom<(&GenericListArray<i32>, MultiPolygonType)> for MultiPolygonArray
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§fn try_from(
(geom_array, typ): (&GenericListArray<i32>, MultiPolygonType),
) -> GeoArrowResult<Self>
fn try_from( (geom_array, typ): (&GenericListArray<i32>, MultiPolygonType), ) -> GeoArrowResult<Self>
Performs the conversion.
Source§impl TryFrom<(&GenericListArray<i64>, MultiPolygonType)> for MultiPolygonArray
impl TryFrom<(&GenericListArray<i64>, MultiPolygonType)> for MultiPolygonArray
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§fn try_from(
(geom_array, typ): (&GenericListArray<i64>, MultiPolygonType),
) -> GeoArrowResult<Self>
fn try_from( (geom_array, typ): (&GenericListArray<i64>, MultiPolygonType), ) -> GeoArrowResult<Self>
Performs the conversion.
Source§impl TryFrom<(&dyn Array, &Field)> for MultiPolygonArray
impl TryFrom<(&dyn Array, &Field)> for MultiPolygonArray
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§impl TryFrom<(&dyn Array, MultiPolygonType)> for MultiPolygonArray
impl TryFrom<(&dyn Array, MultiPolygonType)> for MultiPolygonArray
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§fn try_from(
(value, typ): (&dyn Array, MultiPolygonType),
) -> GeoArrowResult<Self>
fn try_from( (value, typ): (&dyn Array, MultiPolygonType), ) -> GeoArrowResult<Self>
Performs the conversion.
Source§impl<O: OffsetSizeTrait> TryFrom<(GenericWkbArray<O>, MultiPolygonType)> for MultiPolygonArray
impl<O: OffsetSizeTrait> TryFrom<(GenericWkbArray<O>, MultiPolygonType)> for MultiPolygonArray
Source§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
Source§fn try_from(
value: (GenericWkbArray<O>, MultiPolygonType),
) -> GeoArrowResult<Self>
fn try_from( value: (GenericWkbArray<O>, MultiPolygonType), ) -> GeoArrowResult<Self>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for MultiPolygonArray
impl RefUnwindSafe for MultiPolygonArray
impl Send for MultiPolygonArray
impl Sync for MultiPolygonArray
impl Unpin for MultiPolygonArray
impl UnwindSafe for MultiPolygonArray
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