Struct geoarrow2::array::coord::interleaved::InterleavedCoordBuffer
source · pub struct InterleavedCoordBuffer {
pub coords: ScalarBuffer<f64>,
}
Expand description
A an array of XY coordinates stored interleaved in a single buffer.
Fields§
§coords: ScalarBuffer<f64>
Implementations§
source§impl InterleavedCoordBuffer
impl InterleavedCoordBuffer
sourcepub fn new(coords: ScalarBuffer<f64>) -> Self
pub fn new(coords: ScalarBuffer<f64>) -> Self
sourcepub fn try_new(coords: ScalarBuffer<f64>) -> Result<Self>
pub fn try_new(coords: ScalarBuffer<f64>) -> Result<Self>
pub fn values_array(&self) -> Float64Array
pub fn values_field(&self) -> Field
Trait Implementations§
source§impl Clone for InterleavedCoordBuffer
impl Clone for InterleavedCoordBuffer
source§fn clone(&self) -> InterleavedCoordBuffer
fn clone(&self) -> InterleavedCoordBuffer
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 InterleavedCoordBuffer
impl Debug for InterleavedCoordBuffer
source§impl From<InterleavedCoordBuffer> for FixedSizeListArray
impl From<InterleavedCoordBuffer> for FixedSizeListArray
source§fn from(value: InterleavedCoordBuffer) -> Self
fn from(value: InterleavedCoordBuffer) -> Self
Converts to this type from the input type.
source§impl From<MutableInterleavedCoordBuffer> for InterleavedCoordBuffer
impl From<MutableInterleavedCoordBuffer> for InterleavedCoordBuffer
source§fn from(value: MutableInterleavedCoordBuffer) -> Self
fn from(value: MutableInterleavedCoordBuffer) -> Self
Converts to this type from the input type.
source§impl<G: CoordTrait<T = f64>> From<Vec<G>> for InterleavedCoordBuffer
impl<G: CoordTrait<T = f64>> From<Vec<G>> for InterleavedCoordBuffer
source§impl<'a> GeoArrayAccessor<'a> for InterleavedCoordBuffer
impl<'a> GeoArrayAccessor<'a> for InterleavedCoordBuffer
§type Item = InterleavedCoord<'a>
type Item = InterleavedCoord<'a>
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<'a> GeometryArrayTrait<'a> for InterleavedCoordBuffer
impl<'a> GeometryArrayTrait<'a> for InterleavedCoordBuffer
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 validity(&self) -> Option<&NullBuffer>
fn validity(&self) -> Option<&NullBuffer>
Access the array’s validity. Every array has an optional
NullBuffer
that, when available
specifies whether the array 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
Returns a zero-copy slice of this array with the indicated offset and length. Read more
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 IntoArrow for InterleavedCoordBuffer
impl IntoArrow for InterleavedCoordBuffer
type ArrowArray = FixedSizeListArray
fn into_arrow(self) -> Self::ArrowArray
source§impl PartialEq for InterleavedCoordBuffer
impl PartialEq for InterleavedCoordBuffer
source§fn eq(&self, other: &InterleavedCoordBuffer) -> bool
fn eq(&self, other: &InterleavedCoordBuffer) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<&FixedSizeListArray> for InterleavedCoordBuffer
impl TryFrom<&FixedSizeListArray> for InterleavedCoordBuffer
§type Error = GeoArrowError
type Error = GeoArrowError
The type returned in the event of a conversion error.
impl StructuralPartialEq for InterleavedCoordBuffer
Auto Trait Implementations§
impl RefUnwindSafe for InterleavedCoordBuffer
impl Send for InterleavedCoordBuffer
impl Sync for InterleavedCoordBuffer
impl Unpin for InterleavedCoordBuffer
impl UnwindSafe for InterleavedCoordBuffer
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