pub enum CoordBuffer {
Interleaved(InterleavedCoordBuffer),
Separated(SeparatedCoordBuffer),
}
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)
Interleaved coordinates
Separated(SeparatedCoordBuffer)
Separated coordinates
Implementations§
Source§impl CoordBuffer
impl CoordBuffer
Sourcepub fn coord_type(&self) -> CoordType
pub fn coord_type(&self) -> CoordType
The underlying coordinate type
Sourcepub fn into_coord_type(self, coord_type: CoordType) -> Self
pub fn into_coord_type(self, coord_type: CoordType) -> Self
Convert this coordinate array into the given CoordType
This is a no-op if the coord_type matches the existing coord type. Otherwise a full clone of the underlying coordinate buffers will be performed.
Trait Implementations§
Source§impl Clone for CoordBuffer
impl Clone for CoordBuffer
Source§fn clone(&self) -> CoordBuffer
fn clone(&self) -> CoordBuffer
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more