pub enum CoordBuffer<const D: usize> {
Interleaved(InterleavedCoordBuffer<D>),
Separated(SeparatedCoordBuffer<D>),
}Expand description
An Arrow representation of an array of coordinates.
As defined in the GeoArrow spec, coordinates can either be interleaved (i.e. a single array of XYXYXY) or separated (i.e. two arrays, one XXX and another YYY).
This CoordBuffer abstracts over an InterleavedCoordBuffer and a SeparatedCoordBuffer.
For now all coordinate buffers support only two dimensions.
This is named CoordBuffer instead of CoordArray because the buffer does not store its own
validity bitmask. Rather the geometry arrays that build on top of this maintain their own
validity masks.
Variants§
Interleaved(InterleavedCoordBuffer<D>)
Separated(SeparatedCoordBuffer<D>)
Implementations§
source§impl<const D: usize> CoordBuffer<D>
impl<const D: usize> CoordBuffer<D>
pub fn get_x(&self, i: usize) -> f64
pub fn get_y(&self, i: usize) -> f64
pub fn slice(&self, offset: usize, length: usize) -> Self
pub fn owned_slice(&self, offset: usize, length: usize) -> Self
pub fn coord_type(&self) -> CoordType
pub fn storage_type(&self) -> DataType
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn value(&self, index: usize) -> Coord<'_, D>
pub fn into_array_ref(self) -> Arc<dyn Array>
pub fn to_array_ref(&self) -> ArrayRef
pub fn with_coords(self, coords: CoordBuffer<D>) -> Self
pub fn into_coord_type(self, coord_type: CoordType) -> Self
Trait Implementations§
source§impl<const D: usize> Clone for CoordBuffer<D>
impl<const D: usize> Clone for CoordBuffer<D>
source§fn clone(&self) -> CoordBuffer<D>
fn clone(&self) -> CoordBuffer<D>
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<const D: usize> Debug for CoordBuffer<D>
impl<const D: usize> Debug for CoordBuffer<D>
source§impl<const D: usize> From<CoordBufferBuilder<D>> for CoordBuffer<D>
impl<const D: usize> From<CoordBufferBuilder<D>> for CoordBuffer<D>
source§fn from(value: CoordBufferBuilder<D>) -> Self
fn from(value: CoordBufferBuilder<D>) -> Self
Converts to this type from the input type.
source§impl<const D: usize> From<InterleavedCoordBuffer<D>> for CoordBuffer<D>
impl<const D: usize> From<InterleavedCoordBuffer<D>> for CoordBuffer<D>
source§fn from(value: InterleavedCoordBuffer<D>) -> Self
fn from(value: InterleavedCoordBuffer<D>) -> Self
Converts to this type from the input type.
source§impl<const D: usize> From<SeparatedCoordBuffer<D>> for CoordBuffer<D>
impl<const D: usize> From<SeparatedCoordBuffer<D>> for CoordBuffer<D>
source§fn from(value: SeparatedCoordBuffer<D>) -> Self
fn from(value: SeparatedCoordBuffer<D>) -> Self
Converts to this type from the input type.
source§impl<const D: usize> IntoArrow for CoordBuffer<D>
impl<const D: usize> IntoArrow for CoordBuffer<D>
source§type ArrowArray = Arc<dyn Array>
type ArrowArray = Arc<dyn Array>
The type of arrow array that this geoarrow array can be converted into.
source§fn into_arrow(self) -> Self::ArrowArray
fn into_arrow(self) -> Self::ArrowArray
Converts this geoarrow array into an arrow array. Read more
source§impl<const D: usize> PartialEq for CoordBuffer<D>
impl<const D: usize> PartialEq for CoordBuffer<D>
Auto Trait Implementations§
impl<const D: usize> Freeze for CoordBuffer<D>
impl<const D: usize> RefUnwindSafe for CoordBuffer<D>
impl<const D: usize> Send for CoordBuffer<D>
impl<const D: usize> Sync for CoordBuffer<D>
impl<const D: usize> Unpin for CoordBuffer<D>
impl<const D: usize> UnwindSafe for CoordBuffer<D>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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