pub enum Geometry {
Point(Point<f64>),
Line(LineString<f64>),
Polygon(Polygon<f64>),
MultiPoint(MultiPoint<f64>),
MultiLine(MultiLineString<f64>),
MultiPolygon(MultiPolygon<f64>),
Collection(Vec<Geometry>),
}
Variants§
Point(Point<f64>)
Line(LineString<f64>)
Polygon(Polygon<f64>)
MultiPoint(MultiPoint<f64>)
MultiLine(MultiLineString<f64>)
MultiPolygon(MultiPolygon<f64>)
Collection(Vec<Geometry>)
Implementations§
Source§impl Geometry
impl Geometry
Sourcepub fn is_polygon(&self) -> bool
pub fn is_polygon(&self) -> bool
Check if this is a Polygon
Sourcepub fn is_multipoint(&self) -> bool
pub fn is_multipoint(&self) -> bool
Check if this is a MultiPoint
Sourcepub fn is_multiline(&self) -> bool
pub fn is_multiline(&self) -> bool
Check if this is a MultiLine
Sourcepub fn is_multipolygon(&self) -> bool
pub fn is_multipolygon(&self) -> bool
Check if this is a MultiPolygon
Sourcepub fn is_geometry(&self) -> bool
pub fn is_geometry(&self) -> bool
Check if this is not a Collection
Sourcepub fn is_collection(&self) -> bool
pub fn is_collection(&self) -> bool
Check if this is a Collection
Sourcepub fn as_coordinates(&self) -> Value
pub fn as_coordinates(&self) -> Value
Get the raw coordinates of this Geometry as an Array
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Geometry
impl<'de> Deserialize<'de> for Geometry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<LineString> for Geometry
impl From<LineString> for Geometry
Source§fn from(v: LineString<f64>) -> Self
fn from(v: LineString<f64>) -> Self
Converts to this type from the input type.
Source§impl From<MultiLineString> for Geometry
impl From<MultiLineString> for Geometry
Source§fn from(v: MultiLineString<f64>) -> Self
fn from(v: MultiLineString<f64>) -> Self
Converts to this type from the input type.
Source§impl From<MultiPoint> for Geometry
impl From<MultiPoint> for Geometry
Source§fn from(v: MultiPoint<f64>) -> Self
fn from(v: MultiPoint<f64>) -> Self
Converts to this type from the input type.
Source§impl From<MultiPolygon> for Geometry
impl From<MultiPolygon> for Geometry
Source§fn from(v: MultiPolygon<f64>) -> Self
fn from(v: MultiPolygon<f64>) -> Self
Converts to this type from the input type.
Source§impl PartialOrd for Geometry
impl PartialOrd for Geometry
Source§impl Revisioned for Geometry
impl Revisioned for Geometry
impl StructuralPartialEq for Geometry
Auto Trait Implementations§
impl Freeze for Geometry
impl RefUnwindSafe for Geometry
impl Send for Geometry
impl Sync for Geometry
impl Unpin for Geometry
impl UnwindSafe for Geometry
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§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