pub struct PointType { /* private fields */ }
Expand description
A GeoArrow Point type.
Refer to the GeoArrow specification.
Implementations§
Source§impl PointType
impl PointType
Sourcepub fn with_coord_type(self, coord_type: CoordType) -> Self
pub fn with_coord_type(self, coord_type: CoordType) -> Self
Change the underlying CoordType
Sourcepub fn with_dimension(self, dim: Dimension) -> Self
pub fn with_dimension(self, dim: Dimension) -> Self
Change the underlying Dimension
Sourcepub fn with_metadata(self, metadata: Arc<Metadata>) -> Self
pub fn with_metadata(self, metadata: Arc<Metadata>) -> Self
Change the underlying Metadata
Sourcepub fn coord_type(&self) -> CoordType
pub fn coord_type(&self) -> CoordType
Retrieve the underlying CoordType
Source§impl PointType
impl PointType
Sourcepub fn data_type(&self) -> DataType
pub fn data_type(&self) -> DataType
Convert to the corresponding DataType
.
use arrow_schema::{DataType, Field};
use geoarrow_schema::{CoordType, Dimension, PointType};
let geom_type = PointType::new(Dimension::XY, Default::default()).with_coord_type(CoordType::Interleaved);
let expected_type =
DataType::FixedSizeList(Field::new("xy", DataType::Float64, false).into(), 2);
assert_eq!(geom_type.data_type(), expected_type);
Trait Implementations§
Source§impl ExtensionType for PointType
impl ExtensionType for PointType
Source§const NAME: &'static str = "geoarrow.point"
const NAME: &'static str = "geoarrow.point"
The name identifying this extension type. Read more
Source§fn metadata(&self) -> &Self::Metadata
fn metadata(&self) -> &Self::Metadata
Returns a reference to the metadata of this extension type, or
&()
if
if this extension type defines no metadata (Self::Metadata=()
).Source§fn serialize_metadata(&self) -> Option<String>
fn serialize_metadata(&self) -> Option<String>
Returns the serialized representation of the metadata of this extension
type, or
None
if this extension type defines no metadata
(Self::Metadata=()
). Read moreSource§fn deserialize_metadata(
metadata: Option<&str>,
) -> Result<Self::Metadata, ArrowError>
fn deserialize_metadata( metadata: Option<&str>, ) -> Result<Self::Metadata, ArrowError>
Deserialize the metadata of this extension type from the serialized
representation of the metadata. An extension type that defines no
metadata should expect
None
for the serialized metadata and return
Ok(())
. Read moreSource§fn supports_data_type(&self, data_type: &DataType) -> Result<(), ArrowError>
fn supports_data_type(&self, data_type: &DataType) -> Result<(), ArrowError>
Returns
Ok(())
iff the given data type is supported by this extension
type.Source§impl From<PointType> for GeoArrowType
impl From<PointType> for GeoArrowType
impl Eq for PointType
impl StructuralPartialEq for PointType
Auto Trait Implementations§
impl Freeze for PointType
impl RefUnwindSafe for PointType
impl Send for PointType
impl Sync for PointType
impl Unpin for PointType
impl UnwindSafe for PointType
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