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 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
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
Source§impl GeozeroGeometry for RectArray
Available on crate feature geozero
only.
impl GeozeroGeometry for RectArray
geozero
only.Source§impl IntoArrow for RectArray
impl IntoArrow for RectArray
Source§type ArrowArray = StructArray
type ArrowArray = StructArray
Source§type ExtensionType = BoxType
type ExtensionType = BoxType
Source§fn into_arrow(self) -> Self::ArrowArray
fn into_arrow(self) -> Self::ArrowArray
Source§fn extension_type(&self) -> &Self::ExtensionType
fn extension_type(&self) -> &Self::ExtensionType
Source§impl TryFrom<(&StructArray, BoxType)> for RectArray
impl TryFrom<(&StructArray, BoxType)> for RectArray
Source§type Error = GeoArrowError
type Error = GeoArrowError
Source§fn try_from((value, typ): (&StructArray, BoxType)) -> GeoArrowResult<Self>
fn try_from((value, typ): (&StructArray, BoxType)) -> GeoArrowResult<Self>
Auto Trait Implementations§
impl Freeze for RectArray
impl RefUnwindSafe for RectArray
impl Send for RectArray
impl Sync for RectArray
impl Unpin for RectArray
impl UnwindSafe for RectArray
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToGeo for Twhere
T: GeozeroGeometry,
impl<T> ToGeo for Twhere
T: GeozeroGeometry,
Source§impl<T> ToGeometryArray for Twhere
T: GeozeroGeometry,
impl<T> ToGeometryArray for Twhere
T: GeozeroGeometry,
Source§fn to_geometry_builder(
&self,
typ: GeometryType,
) -> Result<GeometryBuilder, GeozeroError>
fn to_geometry_builder( &self, typ: GeometryType, ) -> Result<GeometryBuilder, GeozeroError>
geozero
only.GeometryBuilder
Source§fn to_geometry_array(&self, typ: GeometryType) -> Result<GeometryArray>
fn to_geometry_array(&self, typ: GeometryType) -> Result<GeometryArray>
geozero
only.GeometryArray
Source§impl<T> ToJson for Twhere
T: GeozeroGeometry,
impl<T> ToJson for Twhere
T: GeozeroGeometry,
Source§impl<T> ToLineStringArray for Twhere
T: GeozeroGeometry,
impl<T> ToLineStringArray for Twhere
T: GeozeroGeometry,
Source§fn to_line_string_builder(
&self,
typ: LineStringType,
) -> Result<LineStringBuilder, GeozeroError>
fn to_line_string_builder( &self, typ: LineStringType, ) -> Result<LineStringBuilder, GeozeroError>
geozero
only.Source§fn to_line_string_array(&self, typ: LineStringType) -> Result<LineStringArray>
fn to_line_string_array(&self, typ: LineStringType) -> Result<LineStringArray>
geozero
only.Source§impl<T> ToMultiLineStringArray for Twhere
T: GeozeroGeometry,
impl<T> ToMultiLineStringArray for Twhere
T: GeozeroGeometry,
Source§fn to_multi_line_string_builder(
&self,
typ: MultiLineStringType,
) -> Result<MultiLineStringBuilder, GeozeroError>
fn to_multi_line_string_builder( &self, typ: MultiLineStringType, ) -> Result<MultiLineStringBuilder, GeozeroError>
geozero
only.Source§fn to_multi_line_string_array(
&self,
typ: MultiLineStringType,
) -> Result<MultiLineStringArray>
fn to_multi_line_string_array( &self, typ: MultiLineStringType, ) -> Result<MultiLineStringArray>
geozero
only.Source§impl<T> ToMultiPointArray for Twhere
T: GeozeroGeometry,
impl<T> ToMultiPointArray for Twhere
T: GeozeroGeometry,
Source§fn to_multi_point_builder(
&self,
typ: MultiPointType,
) -> Result<MultiPointBuilder, GeozeroError>
fn to_multi_point_builder( &self, typ: MultiPointType, ) -> Result<MultiPointBuilder, GeozeroError>
geozero
only.Source§fn to_multi_point_array(&self, typ: MultiPointType) -> Result<MultiPointArray>
fn to_multi_point_array(&self, typ: MultiPointType) -> Result<MultiPointArray>
geozero
only.Source§impl<T> ToMultiPolygonArray for Twhere
T: GeozeroGeometry,
impl<T> ToMultiPolygonArray for Twhere
T: GeozeroGeometry,
Source§fn to_multi_polygon_array(
&self,
typ: MultiPolygonType,
) -> Result<MultiPolygonArray, GeozeroError>
fn to_multi_polygon_array( &self, typ: MultiPolygonType, ) -> Result<MultiPolygonArray, GeozeroError>
geozero
only.Source§fn to_multi_polygon_builder(
&self,
typ: MultiPolygonType,
) -> Result<MultiPolygonBuilder, GeozeroError>
fn to_multi_polygon_builder( &self, typ: MultiPolygonType, ) -> Result<MultiPolygonBuilder, GeozeroError>
geozero
only.Source§impl<T> ToPointArray for Twhere
T: GeozeroGeometry,
impl<T> ToPointArray for Twhere
T: GeozeroGeometry,
Source§fn to_point_builder(&self, typ: PointType) -> Result<PointBuilder, GeozeroError>
fn to_point_builder(&self, typ: PointType) -> Result<PointBuilder, GeozeroError>
geozero
only.Source§fn to_point_array(&self, typ: PointType) -> Result<PointArray>
fn to_point_array(&self, typ: PointType) -> Result<PointArray>
geozero
only.Source§impl<T> ToPolygonArray for Twhere
T: GeozeroGeometry,
impl<T> ToPolygonArray for Twhere
T: GeozeroGeometry,
Source§fn to_polygon_builder(
&self,
typ: PolygonType,
) -> Result<PolygonBuilder, GeozeroError>
fn to_polygon_builder( &self, typ: PolygonType, ) -> Result<PolygonBuilder, GeozeroError>
geozero
only.Source§fn to_polygon_array(&self, typ: PolygonType) -> Result<PolygonArray>
fn to_polygon_array(&self, typ: PolygonType) -> Result<PolygonArray>
geozero
only.