pub enum Geometry<T = f64>where
T: CoordNum,{
Point(Point<T>),
Line(Line<T>),
LineString(LineString<T>),
Polygon(Polygon<T>),
MultiPoint(MultiPoint<T>),
MultiLineString(MultiLineString<T>),
MultiPolygon(MultiPolygon<T>),
GeometryCollection(GeometryCollection<T>),
Rect(Rect<T>),
Triangle(Triangle<T>),
}
Expand description
An enum representing any possible geometry type.
All geometry variants (Point
, LineString
, etc.) can be converted to a Geometry
using
Into::into
. Conversely, TryFrom::try_from
can be used to convert a Geometry
back to one of it’s specific enum members.
§Example
use std::convert::TryFrom;
use geo_types::{Point, point, Geometry, GeometryCollection};
let p = point!(x: 1.0, y: 1.0);
let pe: Geometry = p.into();
let pn = Point::try_from(pe).unwrap();
Variants§
Point(Point<T>)
Line(Line<T>)
LineString(LineString<T>)
Polygon(Polygon<T>)
MultiPoint(MultiPoint<T>)
MultiLineString(MultiLineString<T>)
MultiPolygon(MultiPolygon<T>)
GeometryCollection(GeometryCollection<T>)
Rect(Rect<T>)
Triangle(Triangle<T>)
Implementations§
source§impl<T> Geometry<T>where
T: CoordNum,
impl<T> Geometry<T>where
T: CoordNum,
sourcepub fn into_point(self) -> Option<Point<T>>
👎Deprecated: Will be removed in an upcoming version. Switch to std::convert::TryInto<Point>
pub fn into_point(self) -> Option<Point<T>>
If this Geometry is a Point, then return that, else None.
§Examples
use geo_types::*;
use std::convert::TryInto;
let g = Geometry::Point(Point::new(0., 0.));
let p2: Point<f32> = g.try_into().unwrap();
assert_eq!(p2, Point::new(0., 0.,));
sourcepub fn into_line_string(self) -> Option<LineString<T>>
👎Deprecated: Will be removed in an upcoming version. Switch to std::convert::TryInto<LineString>
pub fn into_line_string(self) -> Option<LineString<T>>
If this Geometry is a LineString, then return that LineString, else None.
sourcepub fn into_line(self) -> Option<Line<T>>
👎Deprecated: Will be removed in an upcoming version. Switch to std::convert::TryInto<Line>
pub fn into_line(self) -> Option<Line<T>>
If this Geometry is a Line, then return that Line, else None.
sourcepub fn into_polygon(self) -> Option<Polygon<T>>
👎Deprecated: Will be removed in an upcoming version. Switch to std::convert::TryInto<Polygon>
pub fn into_polygon(self) -> Option<Polygon<T>>
If this Geometry is a Polygon, then return that, else None.
sourcepub fn into_multi_point(self) -> Option<MultiPoint<T>>
👎Deprecated: Will be removed in an upcoming version. Switch to std::convert::TryInto<MultiPoint>
pub fn into_multi_point(self) -> Option<MultiPoint<T>>
If this Geometry is a MultiPoint, then return that, else None.
sourcepub fn into_multi_line_string(self) -> Option<MultiLineString<T>>
👎Deprecated: Will be removed in an upcoming version. Switch to std::convert::TryInto<MultiLineString>
pub fn into_multi_line_string(self) -> Option<MultiLineString<T>>
If this Geometry is a MultiLineString, then return that, else None.
sourcepub fn into_multi_polygon(self) -> Option<MultiPolygon<T>>
👎Deprecated: Will be removed in an upcoming version. Switch to std::convert::TryInto<MultiPolygon>
pub fn into_multi_polygon(self) -> Option<MultiPolygon<T>>
If this Geometry is a MultiPolygon, then return that, else None.
Trait Implementations§
source§impl<T> AbsDiffEq for Geometry<T>where
T: AbsDiffEq<Epsilon = T> + CoordNum,
impl<T> AbsDiffEq for Geometry<T>where
T: AbsDiffEq<Epsilon = T> + CoordNum,
source§fn abs_diff_eq(
&self,
other: &Geometry<T>,
epsilon: <Geometry<T> as AbsDiffEq>::Epsilon
) -> bool
fn abs_diff_eq( &self, other: &Geometry<T>, epsilon: <Geometry<T> as AbsDiffEq>::Epsilon ) -> bool
Equality assertion with an absolute limit.
§Examples
use geo_types::{Geometry, polygon};
let a: Geometry<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7., y: 9.), (x: 0., y: 0.)].into();
let b: Geometry<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7.01, y: 9.), (x: 0., y: 0.)].into();
approx::assert_abs_diff_eq!(a, b, epsilon=0.1);
approx::assert_abs_diff_ne!(a, b, epsilon=0.001);
source§fn default_epsilon() -> <Geometry<T> as AbsDiffEq>::Epsilon
fn default_epsilon() -> <Geometry<T> as AbsDiffEq>::Epsilon
§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
AbsDiffEq::abs_diff_eq
].source§impl<T> Area<T> for Geometry<T>where
T: CoordFloat,
impl<T> Area<T> for Geometry<T>where
T: CoordFloat,
fn signed_area(&self) -> T
fn unsigned_area(&self) -> T
source§impl<T> BoundingRect<T> for Geometry<T>where
T: CoordNum,
impl<T> BoundingRect<T> for Geometry<T>where
T: CoordNum,
source§impl<T> Centroid for Geometry<T>where
T: GeoFloat,
impl<T> Centroid for Geometry<T>where
T: GeoFloat,
source§fn centroid(&self) -> Self::Output
fn centroid(&self) -> Self::Output
The Centroid of a Geometry
is the centroid of its enum variant
§Examples
use geo::Centroid;
use geo::{Geometry, Rect, point};
let rect = Rect::new(
point!(x: 0.0f32, y: 0.0),
point!(x: 1.0, y: 1.0),
);
let geometry = Geometry::from(rect.clone());
assert_eq!(
Some(rect.centroid()),
geometry.centroid(),
);
assert_eq!(
Some(point!(x: 0.5, y: 0.5)),
geometry.centroid(),
);
type Output = Option<Point<T>>
source§impl<T> ChaikinSmoothing<T> for Geometry<T>where
T: CoordFloat + FromPrimitive,
impl<T> ChaikinSmoothing<T> for Geometry<T>where
T: CoordFloat + FromPrimitive,
source§fn chaikin_smoothing(&self, n_iterations: usize) -> Geometry<T>
fn chaikin_smoothing(&self, n_iterations: usize) -> Geometry<T>
n_iterations
times.source§impl<T> ChamberlainDuquetteArea<T> for Geometry<T>where
T: CoordFloat,
impl<T> ChamberlainDuquetteArea<T> for Geometry<T>where
T: CoordFloat,
fn chamberlain_duquette_signed_area(&self) -> T
fn chamberlain_duquette_unsigned_area(&self) -> T
source§impl<F: GeoFloat> ClosestPoint<F> for Geometry<F>
impl<F: GeoFloat> ClosestPoint<F> for Geometry<F>
source§fn closest_point(&self, p: &Point<F>) -> Closest<F>
fn closest_point(&self, p: &Point<F>) -> Closest<F>
self
and p
.source§impl<T> Contains<GeometryCollection<T>> for Geometry<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for Geometry<T>where
T: GeoFloat,
fn contains(&self, geometry_collection: &GeometryCollection<T>) -> bool
source§impl<T> Contains<LineString<T>> for Geometry<T>where
T: GeoFloat,
impl<T> Contains<LineString<T>> for Geometry<T>where
T: GeoFloat,
fn contains(&self, line_string: &LineString<T>) -> bool
source§impl<T> Contains<MultiLineString<T>> for Geometry<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for Geometry<T>where
T: GeoFloat,
fn contains(&self, multi_line_string: &MultiLineString<T>) -> bool
source§impl<T> Contains<MultiPoint<T>> for Geometry<T>where
T: GeoFloat,
impl<T> Contains<MultiPoint<T>> for Geometry<T>where
T: GeoFloat,
fn contains(&self, multi_point: &MultiPoint<T>) -> bool
source§impl<T> Contains<MultiPolygon<T>> for Geometry<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for Geometry<T>where
T: GeoFloat,
fn contains(&self, multi_line_string: &MultiPolygon<T>) -> bool
source§impl<T> CoordinatePosition for Geometry<T>where
T: GeoNum,
impl<T> CoordinatePosition for Geometry<T>where
T: GeoNum,
source§impl<T: CoordNum> CoordsIter for Geometry<T>
impl<T: CoordNum> CoordsIter for Geometry<T>
source§fn coords_count(&self) -> usize
fn coords_count(&self) -> usize
Return the number of coordinates in the Geometry
.
type Iter<'a> = GeometryCoordsIter<'a, T> where T: 'a
type ExteriorIter<'a> = GeometryExteriorCoordsIter<'a, T> where T: 'a
type Scalar = T
source§fn coords_iter(&self) -> Self::Iter<'_>
fn coords_iter(&self) -> Self::Iter<'_>
source§fn exterior_coords_iter(&self) -> Self::ExteriorIter<'_>
fn exterior_coords_iter(&self) -> Self::ExteriorIter<'_>
source§impl<T> EuclideanDistance<T> for Geometry<T>where
T: GeoFloat + FloatConst,
impl<T> EuclideanDistance<T> for Geometry<T>where
T: GeoFloat + FloatConst,
source§fn euclidean_distance(&self, other: &Geometry<T>) -> T
fn euclidean_distance(&self, other: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, Geometry<T>> for GeometryCollection<T>
impl<T> EuclideanDistance<T, Geometry<T>> for GeometryCollection<T>
source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, Geometry<T>> for Line<T>
impl<T> EuclideanDistance<T, Geometry<T>> for Line<T>
source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, Geometry<T>> for LineString<T>
impl<T> EuclideanDistance<T, Geometry<T>> for LineString<T>
source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, Geometry<T>> for MultiLineString<T>
impl<T> EuclideanDistance<T, Geometry<T>> for MultiLineString<T>
source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, Geometry<T>> for MultiPoint<T>
impl<T> EuclideanDistance<T, Geometry<T>> for MultiPoint<T>
source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, Geometry<T>> for MultiPolygon<T>
impl<T> EuclideanDistance<T, Geometry<T>> for MultiPolygon<T>
source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, Geometry<T>> for Point<T>
impl<T> EuclideanDistance<T, Geometry<T>> for Point<T>
source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, Geometry<T>> for Polygon<T>
impl<T> EuclideanDistance<T, Geometry<T>> for Polygon<T>
source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, Geometry<T>> for Rect<T>
impl<T> EuclideanDistance<T, Geometry<T>> for Rect<T>
source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, Geometry<T>> for Triangle<T>
impl<T> EuclideanDistance<T, Geometry<T>> for Triangle<T>
source§fn euclidean_distance(&self, geom: &Geometry<T>) -> T
fn euclidean_distance(&self, geom: &Geometry<T>) -> T
source§impl<T> EuclideanDistance<T, GeometryCollection<T>> for Geometry<T>
impl<T> EuclideanDistance<T, GeometryCollection<T>> for Geometry<T>
source§fn euclidean_distance(&self, other: &GeometryCollection<T>) -> T
fn euclidean_distance(&self, other: &GeometryCollection<T>) -> T
source§impl<T> EuclideanDistance<T, Line<T>> for Geometry<T>
impl<T> EuclideanDistance<T, Line<T>> for Geometry<T>
source§fn euclidean_distance(&self, other: &Line<T>) -> T
fn euclidean_distance(&self, other: &Line<T>) -> T
source§impl<T> EuclideanDistance<T, LineString<T>> for Geometry<T>
impl<T> EuclideanDistance<T, LineString<T>> for Geometry<T>
source§fn euclidean_distance(&self, other: &LineString<T>) -> T
fn euclidean_distance(&self, other: &LineString<T>) -> T
source§impl<T> EuclideanDistance<T, MultiLineString<T>> for Geometry<T>
impl<T> EuclideanDistance<T, MultiLineString<T>> for Geometry<T>
source§fn euclidean_distance(&self, other: &MultiLineString<T>) -> T
fn euclidean_distance(&self, other: &MultiLineString<T>) -> T
source§impl<T> EuclideanDistance<T, MultiPoint<T>> for Geometry<T>
impl<T> EuclideanDistance<T, MultiPoint<T>> for Geometry<T>
source§fn euclidean_distance(&self, other: &MultiPoint<T>) -> T
fn euclidean_distance(&self, other: &MultiPoint<T>) -> T
source§impl<T> EuclideanDistance<T, MultiPolygon<T>> for Geometry<T>
impl<T> EuclideanDistance<T, MultiPolygon<T>> for Geometry<T>
source§fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T
fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T
source§impl<T> EuclideanDistance<T, Point<T>> for Geometry<T>
impl<T> EuclideanDistance<T, Point<T>> for Geometry<T>
source§fn euclidean_distance(&self, other: &Point<T>) -> T
fn euclidean_distance(&self, other: &Point<T>) -> T
source§impl<T> EuclideanDistance<T, Polygon<T>> for Geometry<T>
impl<T> EuclideanDistance<T, Polygon<T>> for Geometry<T>
source§fn euclidean_distance(&self, other: &Polygon<T>) -> T
fn euclidean_distance(&self, other: &Polygon<T>) -> T
source§impl<T> EuclideanDistance<T, Rect<T>> for Geometry<T>
impl<T> EuclideanDistance<T, Rect<T>> for Geometry<T>
source§fn euclidean_distance(&self, other: &Rect<T>) -> T
fn euclidean_distance(&self, other: &Rect<T>) -> T
source§impl<T> EuclideanDistance<T, Triangle<T>> for Geometry<T>
impl<T> EuclideanDistance<T, Triangle<T>> for Geometry<T>
source§fn euclidean_distance(&self, other: &Triangle<T>) -> T
fn euclidean_distance(&self, other: &Triangle<T>) -> T
source§impl<T> From<LineString<T>> for Geometry<T>where
T: CoordNum,
impl<T> From<LineString<T>> for Geometry<T>where
T: CoordNum,
source§fn from(x: LineString<T>) -> Geometry<T>
fn from(x: LineString<T>) -> Geometry<T>
source§impl<T> From<MultiLineString<T>> for Geometry<T>where
T: CoordNum,
impl<T> From<MultiLineString<T>> for Geometry<T>where
T: CoordNum,
source§fn from(x: MultiLineString<T>) -> Geometry<T>
fn from(x: MultiLineString<T>) -> Geometry<T>
source§impl<T> From<MultiPoint<T>> for Geometry<T>where
T: CoordNum,
impl<T> From<MultiPoint<T>> for Geometry<T>where
T: CoordNum,
source§fn from(x: MultiPoint<T>) -> Geometry<T>
fn from(x: MultiPoint<T>) -> Geometry<T>
source§impl<T> From<MultiPolygon<T>> for Geometry<T>where
T: CoordNum,
impl<T> From<MultiPolygon<T>> for Geometry<T>where
T: CoordNum,
source§fn from(x: MultiPolygon<T>) -> Geometry<T>
fn from(x: MultiPolygon<T>) -> Geometry<T>
source§impl GeodesicArea<f64> for Geometry<f64>
impl GeodesicArea<f64> for Geometry<f64>
source§fn geodesic_perimeter(&self) -> f64
fn geodesic_perimeter(&self) -> f64
source§fn geodesic_area_signed(&self) -> f64
fn geodesic_area_signed(&self) -> f64
source§fn geodesic_area_unsigned(&self) -> f64
fn geodesic_area_unsigned(&self) -> f64
source§impl<C: GeoNum> HasDimensions for Geometry<C>
impl<C: GeoNum> HasDimensions for Geometry<C>
source§fn dimensions(&self) -> Dimensions
fn dimensions(&self) -> Dimensions
Rect
s are 2-dimensional, but it’s possible to create degenerate Rect
s which
have either 1 or 0 dimensions. Read moresource§fn boundary_dimensions(&self) -> Dimensions
fn boundary_dimensions(&self) -> Dimensions
Geometry
’s boundary, as used by OGC-SFA. Read moresource§impl<T> HaversineClosestPoint<T> for Geometry<T>where
T: GeoFloat + FromPrimitive,
impl<T> HaversineClosestPoint<T> for Geometry<T>where
T: GeoFloat + FromPrimitive,
fn haversine_closest_point(&self, from: &Point<T>) -> Closest<T>
source§impl<T> InteriorPoint for Geometry<T>where
T: GeoFloat,
impl<T> InteriorPoint for Geometry<T>where
T: GeoFloat,
source§impl<T, G> Intersects<G> for Geometry<T>where
T: CoordNum,
Point<T>: Intersects<G>,
MultiPoint<T>: Intersects<G>,
Line<T>: Intersects<G>,
LineString<T>: Intersects<G>,
MultiLineString<T>: Intersects<G>,
Triangle<T>: Intersects<G>,
Rect<T>: Intersects<G>,
Polygon<T>: Intersects<G>,
MultiPolygon<T>: Intersects<G>,
G: BoundingRect<T>,
impl<T, G> Intersects<G> for Geometry<T>where
T: CoordNum,
Point<T>: Intersects<G>,
MultiPoint<T>: Intersects<G>,
Line<T>: Intersects<G>,
LineString<T>: Intersects<G>,
MultiLineString<T>: Intersects<G>,
Triangle<T>: Intersects<G>,
Rect<T>: Intersects<G>,
Polygon<T>: Intersects<G>,
MultiPolygon<T>: Intersects<G>,
G: BoundingRect<T>,
fn intersects(&self, rhs: &G) -> bool
source§impl<T> Intersects<Geometry<T>> for Coord<T>
impl<T> Intersects<Geometry<T>> for Coord<T>
fn intersects(&self, rhs: &Geometry<T>) -> bool
source§impl<T> Intersects<Geometry<T>> for Line<T>
impl<T> Intersects<Geometry<T>> for Line<T>
fn intersects(&self, rhs: &Geometry<T>) -> bool
source§impl<T> Intersects<Geometry<T>> for Polygon<T>
impl<T> Intersects<Geometry<T>> for Polygon<T>
fn intersects(&self, rhs: &Geometry<T>) -> bool
source§impl<T> Intersects<Geometry<T>> for Rect<T>
impl<T> Intersects<Geometry<T>> for Rect<T>
fn intersects(&self, rhs: &Geometry<T>) -> bool
source§impl<T> Intersects<Geometry<T>> for Triangle<T>
impl<T> Intersects<Geometry<T>> for Triangle<T>
fn intersects(&self, rhs: &Geometry<T>) -> bool
source§impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for Geometry<T>
impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for Geometry<T>
source§impl<T: CoordNum> MapCoordsInPlace<T> for Geometry<T>
impl<T: CoordNum> MapCoordsInPlace<T> for Geometry<T>
source§impl<T> PartialEq for Geometry<T>
impl<T> PartialEq for Geometry<T>
source§impl<F: GeoFloat> Relate<F, Geometry<F>> for Geometry<F>
impl<F: GeoFloat> Relate<F, Geometry<F>> for Geometry<F>
fn relate(&self, other: &Geometry<F>) -> IntersectionMatrix
source§impl<T> RelativeEq for Geometry<T>where
T: AbsDiffEq<Epsilon = T> + CoordNum + RelativeEq,
impl<T> RelativeEq for Geometry<T>where
T: AbsDiffEq<Epsilon = T> + CoordNum + RelativeEq,
source§fn relative_eq(
&self,
other: &Geometry<T>,
epsilon: <Geometry<T> as AbsDiffEq>::Epsilon,
max_relative: <Geometry<T> as AbsDiffEq>::Epsilon
) -> bool
fn relative_eq( &self, other: &Geometry<T>, epsilon: <Geometry<T> as AbsDiffEq>::Epsilon, max_relative: <Geometry<T> as AbsDiffEq>::Epsilon ) -> bool
Equality assertion within a relative limit.
§Examples
use geo_types::{Geometry, polygon};
let a: Geometry<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7., y: 9.), (x: 0., y: 0.)].into();
let b: Geometry<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7.01, y: 9.), (x: 0., y: 0.)].into();
approx::assert_relative_eq!(a, b, max_relative=0.1);
approx::assert_relative_ne!(a, b, max_relative=0.001);
source§fn default_max_relative() -> <Geometry<T> as AbsDiffEq>::Epsilon
fn default_max_relative() -> <Geometry<T> as AbsDiffEq>::Epsilon
§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon ) -> bool
RelativeEq::relative_eq
].source§impl<T> RemoveRepeatedPoints<T> for Geometry<T>where
T: CoordNum + FromPrimitive,
impl<T> RemoveRepeatedPoints<T> for Geometry<T>where
T: CoordNum + FromPrimitive,
source§fn remove_repeated_points(&self) -> Self
fn remove_repeated_points(&self) -> Self
Create a Geometry with consecutive repeated points removed.
source§fn remove_repeated_points_mut(&mut self)
fn remove_repeated_points_mut(&mut self)
Remove consecutive repeated points from a Geometry inplace.
source§impl<T> TryFrom<Geometry<T>> for Line<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for Line<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
source§impl<T> TryFrom<Geometry<T>> for LineString<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for LineString<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
source§impl<T> TryFrom<Geometry<T>> for MultiLineString<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for MultiLineString<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
source§impl<T> TryFrom<Geometry<T>> for MultiPoint<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for MultiPoint<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
source§impl<T> TryFrom<Geometry<T>> for MultiPolygon<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for MultiPolygon<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
source§impl<T> TryFrom<Geometry<T>> for Point<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for Point<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
source§impl<T> TryFrom<Geometry<T>> for Polygon<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for Polygon<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
source§impl<T> TryFrom<Geometry<T>> for Rect<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for Rect<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
source§impl<T> TryFrom<Geometry<T>> for Triangle<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for Triangle<T>where
T: CoordNum,
Convert a Geometry enum into its inner type.
Fails if the enum case does not match the type you are trying to convert it to.
impl<T> Eq for Geometry<T>
impl<T> StructuralPartialEq for Geometry<T>where
T: CoordNum,
Auto Trait Implementations§
impl<T> RefUnwindSafe for Geometry<T>where
T: RefUnwindSafe,
impl<T> Send for Geometry<T>where
T: Send,
impl<T> Sync for Geometry<T>where
T: Sync,
impl<T> Unpin for Geometry<T>where
T: Unpin,
impl<T> UnwindSafe for Geometry<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T, M> AffineOps<T> for M
impl<T, M> AffineOps<T> for M
source§fn affine_transform(&self, transform: &AffineTransform<T>) -> M
fn affine_transform(&self, transform: &AffineTransform<T>) -> M
transform
immutably, outputting a new geometry.source§fn affine_transform_mut(&mut self, transform: &AffineTransform<T>)
fn affine_transform_mut(&mut self, transform: &AffineTransform<T>)
transform
to mutate self
.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<'a, T, G> ConvexHull<'a, T> for Gwhere
T: GeoNum,
G: CoordsIter<Scalar = T>,
impl<'a, T, G> ConvexHull<'a, T> for Gwhere
T: GeoNum,
G: CoordsIter<Scalar = T>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<'a, T, G> Extremes<'a, T> for Gwhere
G: CoordsIter<Scalar = T>,
T: CoordNum,
impl<'a, T, G> Extremes<'a, T> for Gwhere
G: CoordsIter<Scalar = T>,
T: CoordNum,
source§impl<T, G> HausdorffDistance<T> for Gwhere
T: GeoFloat,
G: CoordsIter<Scalar = T>,
impl<T, G> HausdorffDistance<T> for Gwhere
T: GeoFloat,
G: CoordsIter<Scalar = T>,
fn hausdorff_distance<Rhs>(&self, rhs: &Rhs) -> Twhere
Rhs: CoordsIter<Scalar = T>,
source§impl<T, G> MinimumRotatedRect<T> for G
impl<T, G> MinimumRotatedRect<T> for G
type Scalar = T
fn minimum_rotated_rect( &self ) -> Option<Polygon<<G as MinimumRotatedRect<T>>::Scalar>>
source§impl<G, IP, IR, T> Rotate<T> for G
impl<G, IP, IR, T> Rotate<T> for G
source§fn rotate_around_centroid(&self, degrees: T) -> G
fn rotate_around_centroid(&self, degrees: T) -> G
source§fn rotate_around_centroid_mut(&mut self, degrees: T)
fn rotate_around_centroid_mut(&mut self, degrees: T)
Self::rotate_around_centroid
source§fn rotate_around_center(&self, degrees: T) -> G
fn rotate_around_center(&self, degrees: T) -> G
source§fn rotate_around_center_mut(&mut self, degrees: T)
fn rotate_around_center_mut(&mut self, degrees: T)
Self::rotate_around_center
source§fn rotate_around_point(&self, degrees: T, point: Point<T>) -> G
fn rotate_around_point(&self, degrees: T, point: Point<T>) -> G
source§fn rotate_around_point_mut(&mut self, degrees: T, point: Point<T>)
fn rotate_around_point_mut(&mut self, degrees: T, point: Point<T>)
Self::rotate_around_point
source§impl<T, IR, G> Scale<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
impl<T, IR, G> Scale<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
source§fn scale(&self, scale_factor: T) -> G
fn scale(&self, scale_factor: T) -> G
source§fn scale_xy(&self, x_factor: T, y_factor: T) -> G
fn scale_xy(&self, x_factor: T, y_factor: T) -> G
x_factor
and
y_factor
to distort the geometry’s aspect ratio. Read moresource§fn scale_xy_mut(&mut self, x_factor: T, y_factor: T)
fn scale_xy_mut(&mut self, x_factor: T, y_factor: T)
scale_xy
.source§fn scale_around_point(
&self,
x_factor: T,
y_factor: T,
origin: impl Into<Coord<T>>
) -> G
fn scale_around_point( &self, x_factor: T, y_factor: T, origin: impl Into<Coord<T>> ) -> G
origin
. Read moresource§fn scale_around_point_mut(
&mut self,
x_factor: T,
y_factor: T,
origin: impl Into<Coord<T>>
)
fn scale_around_point_mut( &mut self, x_factor: T, y_factor: T, origin: impl Into<Coord<T>> )
scale_around_point
.source§impl<T, IR, G> Skew<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
impl<T, IR, G> Skew<T> for Gwhere
T: CoordFloat,
IR: Into<Option<Rect<T>>>,
G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,
source§fn skew(&self, degrees: T) -> G
fn skew(&self, degrees: T) -> G
source§fn skew_xy(&self, degrees_x: T, degrees_y: T) -> G
fn skew_xy(&self, degrees_x: T, degrees_y: T) -> G
source§fn skew_xy_mut(&mut self, degrees_x: T, degrees_y: T)
fn skew_xy_mut(&mut self, degrees_x: T, degrees_y: T)
skew_xy
.source§fn skew_around_point(&self, xs: T, ys: T, origin: impl Into<Coord<T>>) -> G
fn skew_around_point(&self, xs: T, ys: T, origin: impl Into<Coord<T>>) -> G
origin
, sheared by an
angle along the x and y dimensions. Read moresource§fn skew_around_point_mut(&mut self, xs: T, ys: T, origin: impl Into<Coord<T>>)
fn skew_around_point_mut(&mut self, xs: T, ys: T, origin: impl Into<Coord<T>>)
skew_around_point
.