pub struct RectArray { /* private fields */ }
Expand description
An immutable array of Rect or Box geometries.
A rect is an axis-aligned bounded rectangle whose area is defined by minimum and maximum coordinates.
All rects must have the same dimension.
This is not an array type defined by the GeoArrow specification (as of spec version 0.1)
but is included here for parity with georust/geo, and to save memory for the output of
bounds()
.
Internally this is implemented as a FixedSizeList, laid out as minx, miny, maxx, maxy.
Implementations§
Source§impl RectArray
impl RectArray
Sourcepub fn new(
lower: SeparatedCoordBuffer,
upper: SeparatedCoordBuffer,
nulls: Option<NullBuffer>,
metadata: Arc<Metadata>,
) -> Self
pub fn new( lower: SeparatedCoordBuffer, upper: SeparatedCoordBuffer, nulls: Option<NullBuffer>, metadata: Arc<Metadata>, ) -> Self
Construct a new RectArray
from parts
Sourcepub fn lower(&self) -> &SeparatedCoordBuffer
pub fn lower(&self) -> &SeparatedCoordBuffer
Access the coordinate buffer of the “lower” corner of the RectArray
Note that this needs to be interpreted in conjunction with the null buffer.
Sourcepub fn upper(&self) -> &SeparatedCoordBuffer
pub fn upper(&self) -> &SeparatedCoordBuffer
Access the coordinate buffer of the “upper” corner of the RectArray
Note that this needs to be interpreted in conjunction with the null buffer.
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 From<RectArray> for PolygonArray
impl From<RectArray> for PolygonArray
Source§impl GeoArrowArray for RectArray
impl GeoArrowArray for RectArray
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>
Source§fn logical_null_count(&self) -> usize
fn logical_null_count(&self) -> usize
Source§fn data_type(&self) -> GeoArrowType
fn data_type(&self) -> GeoArrowType
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>
Source§fn with_metadata(self, metadata: Arc<Metadata>) -> Arc<dyn GeoArrowArray>
fn with_metadata(self, metadata: Arc<Metadata>) -> Arc<dyn GeoArrowArray>
Metadata
of this array.Source§impl<'a> GeoArrowArrayAccessor<'a> for RectArray
impl<'a> GeoArrowArrayAccessor<'a> for RectArray
Source§type Item = Rect<'a>
type Item = Rect<'a>
Source§unsafe fn value_unchecked(&'a self, index: usize) -> GeoArrowResult<Self::Item>
unsafe fn value_unchecked(&'a self, index: usize) -> GeoArrowResult<Self::Item>
i
, not considering validity. Read moreSource§fn value(&'a self, index: usize) -> GeoArrowResult<Self::Item>
fn value(&'a self, index: usize) -> GeoArrowResult<Self::Item>
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>>
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>>
i
as an Arrow scalar, considering validity. Read more