Struct geo::geometry::GeometryCollection
source · pub struct GeometryCollection<T = f64>(pub Vec<Geometry<T>, Global>)
where
T: CoordNum;
Expand description
A collection of Geometry
types.
It can be created from a Vec
of Geometries, or from an Iterator which yields Geometries.
Looping over this object yields its component Geometry
enum members (not the underlying geometry
primitives), and it supports iteration and indexing as
well as the various
MapCoords
functions, which are directly applied to the
underlying geometry primitives.
Examples
Looping
use std::convert::TryFrom;
use geo_types::{Point, point, Geometry, GeometryCollection};
let p = point!(x: 1.0, y: 1.0);
let pe = Geometry::Point(p);
let gc = GeometryCollection::new_from(vec![pe]);
for geom in gc {
println!("{:?}", Point::try_from(geom).unwrap().x());
}
Implements iter()
use std::convert::TryFrom;
use geo_types::{Point, point, Geometry, GeometryCollection};
let p = point!(x: 1.0, y: 1.0);
let pe = Geometry::Point(p);
let gc = GeometryCollection::new_from(vec![pe]);
gc.iter().for_each(|geom| println!("{:?}", geom));
Mutable Iteration
use std::convert::TryFrom;
use geo_types::{Point, point, Geometry, GeometryCollection};
let p = point!(x: 1.0, y: 1.0);
let pe = Geometry::Point(p);
let mut gc = GeometryCollection::new_from(vec![pe]);
gc.iter_mut().for_each(|geom| {
if let Geometry::Point(p) = geom {
p.set_x(0.2);
}
});
let updated = gc[0].clone();
assert_eq!(Point::try_from(updated).unwrap().x(), 0.2);
Indexing
use std::convert::TryFrom;
use geo_types::{Point, point, Geometry, GeometryCollection};
let p = point!(x: 1.0, y: 1.0);
let pe = Geometry::Point(p);
let gc = GeometryCollection::new_from(vec![pe]);
println!("{:?}", gc[0]);
Tuple Fields§
§0: Vec<Geometry<T>, Global>
Implementations§
source§impl<T> GeometryCollection<T>where
T: CoordNum,
impl<T> GeometryCollection<T>where T: CoordNum,
sourcepub fn new() -> GeometryCollection<T>
👎Deprecated: Will be replaced with a parametrized version in upcoming version. Use GeometryCollection::default() instead
pub fn new() -> GeometryCollection<T>
Return an empty GeometryCollection
Trait Implementations§
source§impl<T> AbsDiffEq<GeometryCollection<T>> for GeometryCollection<T>where
T: AbsDiffEq<T, Epsilon = T> + CoordNum,
<T as AbsDiffEq<T>>::Epsilon: Copy,
impl<T> AbsDiffEq<GeometryCollection<T>> for GeometryCollection<T>where T: AbsDiffEq<T, Epsilon = T> + CoordNum, <T as AbsDiffEq<T>>::Epsilon: Copy,
source§fn abs_diff_eq(
&self,
other: &GeometryCollection<T>,
epsilon: <GeometryCollection<T> as AbsDiffEq<GeometryCollection<T>>>::Epsilon
) -> bool
fn abs_diff_eq( &self, other: &GeometryCollection<T>, epsilon: <GeometryCollection<T> as AbsDiffEq<GeometryCollection<T>>>::Epsilon ) -> bool
Equality assertion with an absolute limit.
Examples
use geo_types::{GeometryCollection, point};
let a = GeometryCollection::new_from(vec![point![x: 0.0, y: 0.0].into()]);
let b = GeometryCollection::new_from(vec![point![x: 0.0, y: 0.1].into()]);
approx::abs_diff_eq!(a, b, epsilon=0.1);
approx::abs_diff_ne!(a, b, epsilon=0.001);
source§fn default_epsilon(
) -> <GeometryCollection<T> as AbsDiffEq<GeometryCollection<T>>>::Epsilon
fn default_epsilon( ) -> <GeometryCollection<T> as AbsDiffEq<GeometryCollection<T>>>::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 GeometryCollection<T>where
T: CoordFloat,
impl<T> Area<T> for GeometryCollection<T>where T: CoordFloat,
fn signed_area(&self) -> T
fn unsigned_area(&self) -> T
source§impl<T> BoundingRect<T> for GeometryCollection<T>where
T: CoordNum,
impl<T> BoundingRect<T> for GeometryCollection<T>where T: CoordNum,
source§impl<T> Centroid for GeometryCollection<T>where
T: GeoFloat,
impl<T> Centroid for GeometryCollection<T>where T: GeoFloat,
source§fn centroid(&self) -> Self::Output
fn centroid(&self) -> Self::Output
The Centroid of a GeometryCollection
is the mean of the centroids of elements, weighted
by the area of its elements.
Note that this means, that elements which have no area are not considered when calculating the centroid.
Examples
use geo::Centroid;
use geo::{Geometry, GeometryCollection, Rect, Triangle, point, coord};
let rect_geometry = Geometry::from(Rect::new(
point!(x: 0.0f32, y: 0.0),
point!(x: 1.0, y: 1.0),
));
let triangle_geometry = Geometry::from(Triangle::new(
coord!(x: 0.0f32, y: -1.0),
coord!(x: 3.0, y: 0.0),
coord!(x: 0.0, y: 1.0),
));
let point_geometry = Geometry::from(
point!(x: 12351.0, y: 129815.0)
);
let geometry_collection = GeometryCollection::new_from(
vec![
rect_geometry,
triangle_geometry,
point_geometry
]
);
assert_eq!(
Some(point!(x: 0.875, y: 0.125)),
geometry_collection.centroid(),
);
type Output = Option<Point<T>>
source§impl<T> ChamberlainDuquetteArea<T> for GeometryCollection<T>where
T: CoordFloat,
impl<T> ChamberlainDuquetteArea<T> for GeometryCollection<T>where T: CoordFloat,
fn chamberlain_duquette_signed_area(&self) -> T
fn chamberlain_duquette_unsigned_area(&self) -> T
source§impl<T> Clone for GeometryCollection<T>where
T: Clone + CoordNum,
impl<T> Clone for GeometryCollection<T>where T: Clone + CoordNum,
source§fn clone(&self) -> GeometryCollection<T>
fn clone(&self) -> GeometryCollection<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<F: GeoFloat> ClosestPoint<F, Point<F>> for GeometryCollection<F>
impl<F: GeoFloat> ClosestPoint<F, Point<F>> for GeometryCollection<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<F> Contains<GeometryCollection<F>> for MultiPolygon<F>where
F: GeoFloat,
impl<F> Contains<GeometryCollection<F>> for MultiPolygon<F>where F: GeoFloat,
fn contains(&self, rhs: &GeometryCollection<F>) -> bool
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<GeometryCollection<T>> for GeometryCollection<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for GeometryCollection<T>where T: GeoFloat,
fn contains(&self, target: &GeometryCollection<T>) -> bool
source§impl<T> Contains<GeometryCollection<T>> for Line<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for Line<T>where T: GeoFloat,
fn contains(&self, target: &GeometryCollection<T>) -> bool
source§impl<T> Contains<GeometryCollection<T>> for LineString<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for LineString<T>where T: GeoFloat,
fn contains(&self, target: &GeometryCollection<T>) -> bool
source§impl<T> Contains<GeometryCollection<T>> for MultiLineString<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for MultiLineString<T>where T: GeoFloat,
fn contains(&self, target: &GeometryCollection<T>) -> bool
source§impl<T> Contains<GeometryCollection<T>> for MultiPoint<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for MultiPoint<T>where T: GeoFloat,
fn contains(&self, target: &GeometryCollection<T>) -> bool
source§impl<T> Contains<GeometryCollection<T>> for Point<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for Point<T>where T: GeoFloat,
fn contains(&self, geometry_collection: &GeometryCollection<T>) -> bool
source§impl<T> Contains<GeometryCollection<T>> for Polygon<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for Polygon<T>where T: GeoFloat,
fn contains(&self, target: &GeometryCollection<T>) -> bool
source§impl<T> Contains<GeometryCollection<T>> for Rect<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for Rect<T>where T: GeoFloat,
fn contains(&self, target: &GeometryCollection<T>) -> bool
source§impl<T> Contains<GeometryCollection<T>> for Triangle<T>where
T: GeoFloat,
impl<T> Contains<GeometryCollection<T>> for Triangle<T>where T: GeoFloat,
fn contains(&self, target: &GeometryCollection<T>) -> bool
source§impl<T> Contains<LineString<T>> for GeometryCollection<T>where
T: GeoFloat,
impl<T> Contains<LineString<T>> for GeometryCollection<T>where T: GeoFloat,
fn contains(&self, target: &LineString<T>) -> bool
source§impl<T> Contains<MultiLineString<T>> for GeometryCollection<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for GeometryCollection<T>where T: GeoFloat,
fn contains(&self, target: &MultiLineString<T>) -> bool
source§impl<T> Contains<MultiPoint<T>> for GeometryCollection<T>where
T: GeoFloat,
impl<T> Contains<MultiPoint<T>> for GeometryCollection<T>where T: GeoFloat,
fn contains(&self, target: &MultiPoint<T>) -> bool
source§impl<T> Contains<MultiPolygon<T>> for GeometryCollection<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for GeometryCollection<T>where T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
source§impl<T> CoordinatePosition for GeometryCollection<T>where
T: GeoNum,
impl<T> CoordinatePosition for GeometryCollection<T>where T: GeoNum,
source§impl<'a, T: CoordNum + 'a> CoordsIter<'a> for GeometryCollection<T>
impl<'a, T: CoordNum + 'a> CoordsIter<'a> for GeometryCollection<T>
source§fn coords_count(&'a self) -> usize
fn coords_count(&'a self) -> usize
Return the number of coordinates in the GeometryCollection
.
type Iter = Box<dyn Iterator<Item = Coord<T>> + 'a, Global>
type ExteriorIter = Box<dyn Iterator<Item = Coord<T>> + 'a, Global>
type Scalar = T
source§fn coords_iter(&'a self) -> Self::Iter
fn coords_iter(&'a self) -> Self::Iter
source§fn exterior_coords_iter(&'a self) -> Self::ExteriorIter
fn exterior_coords_iter(&'a self) -> Self::ExteriorIter
source§impl<T> Default for GeometryCollection<T>where
T: CoordNum,
impl<T> Default for GeometryCollection<T>where T: CoordNum,
source§fn default() -> GeometryCollection<T>
fn default() -> GeometryCollection<T>
source§impl<'de, T> Deserialize<'de> for GeometryCollection<T>where
T: CoordNum + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for GeometryCollection<T>where T: CoordNum + Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<GeometryCollection<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<GeometryCollection<T>, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl<T, IG> From<IG> for GeometryCollection<T>where
T: CoordNum,
IG: Into<Geometry<T>>,
impl<T, IG> From<IG> for GeometryCollection<T>where T: CoordNum, IG: Into<Geometry<T>>,
DO NOT USE! Deprecated since 0.7.5.
Use GeometryCollection::from(vec![geom])
instead.
source§fn from(x: IG) -> GeometryCollection<T>
fn from(x: IG) -> GeometryCollection<T>
source§impl<T, IG> From<Vec<IG, Global>> for GeometryCollection<T>where
T: CoordNum,
IG: Into<Geometry<T>>,
impl<T, IG> From<Vec<IG, Global>> for GeometryCollection<T>where T: CoordNum, IG: Into<Geometry<T>>,
source§impl<T, IG> FromIterator<IG> for GeometryCollection<T>where
T: CoordNum,
IG: Into<Geometry<T>>,
impl<T, IG> FromIterator<IG> for GeometryCollection<T>where T: CoordNum, IG: Into<Geometry<T>>,
Collect Geometries (or what can be converted to a Geometry) into a GeometryCollection
source§fn from_iter<I>(iter: I) -> GeometryCollection<T>where
I: IntoIterator<Item = IG>,
fn from_iter<I>(iter: I) -> GeometryCollection<T>where I: IntoIterator<Item = IG>,
source§impl GeodesicArea<f64> for GeometryCollection
impl GeodesicArea<f64> for GeometryCollection
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 GeometryCollection<C>
impl<C: GeoNum> HasDimensions for GeometryCollection<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> InteriorPoint for GeometryCollection<T>where
T: GeoFloat,
impl<T> InteriorPoint for GeometryCollection<T>where T: GeoFloat,
source§impl<T, G> Intersects<G> for GeometryCollection<T>where
T: CoordNum,
Geometry<T>: Intersects<G>,
G: BoundingRect<T>,
impl<T, G> Intersects<G> for GeometryCollection<T>where T: CoordNum, Geometry<T>: Intersects<G>, G: BoundingRect<T>,
fn intersects(&self, rhs: &G) -> bool
source§impl<T> Intersects<GeometryCollection<T>> for Coord<T>where
GeometryCollection<T>: Intersects<Coord<T>>,
T: CoordNum,
impl<T> Intersects<GeometryCollection<T>> for Coord<T>where GeometryCollection<T>: Intersects<Coord<T>>, T: CoordNum,
fn intersects(&self, rhs: &GeometryCollection<T>) -> bool
source§impl<T> Intersects<GeometryCollection<T>> for Line<T>where
GeometryCollection<T>: Intersects<Line<T>>,
T: CoordNum,
impl<T> Intersects<GeometryCollection<T>> for Line<T>where GeometryCollection<T>: Intersects<Line<T>>, T: CoordNum,
fn intersects(&self, rhs: &GeometryCollection<T>) -> bool
source§impl<T> Intersects<GeometryCollection<T>> for Polygon<T>where
GeometryCollection<T>: Intersects<Polygon<T>>,
T: CoordNum,
impl<T> Intersects<GeometryCollection<T>> for Polygon<T>where GeometryCollection<T>: Intersects<Polygon<T>>, T: CoordNum,
fn intersects(&self, rhs: &GeometryCollection<T>) -> bool
source§impl<T> Intersects<GeometryCollection<T>> for Rect<T>where
GeometryCollection<T>: Intersects<Rect<T>>,
T: CoordNum,
impl<T> Intersects<GeometryCollection<T>> for Rect<T>where GeometryCollection<T>: Intersects<Rect<T>>, T: CoordNum,
fn intersects(&self, rhs: &GeometryCollection<T>) -> bool
source§impl<'a, T> IntoIterator for &'a GeometryCollection<T>where
T: CoordNum,
impl<'a, T> IntoIterator for &'a GeometryCollection<T>where T: CoordNum,
source§impl<'a, T> IntoIterator for &'a mut GeometryCollection<T>where
T: CoordNum,
impl<'a, T> IntoIterator for &'a mut GeometryCollection<T>where T: CoordNum,
source§impl<T> IntoIterator for GeometryCollection<T>where
T: CoordNum,
impl<T> IntoIterator for GeometryCollection<T>where T: CoordNum,
source§impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for GeometryCollection<T>
impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for GeometryCollection<T>
source§impl<T: CoordNum> MapCoordsInPlace<T> for GeometryCollection<T>
impl<T: CoordNum> MapCoordsInPlace<T> for GeometryCollection<T>
source§impl<T> PartialEq<GeometryCollection<T>> for GeometryCollection<T>where
T: PartialEq<T> + CoordNum,
impl<T> PartialEq<GeometryCollection<T>> for GeometryCollection<T>where T: PartialEq<T> + CoordNum,
source§fn eq(&self, other: &GeometryCollection<T>) -> bool
fn eq(&self, other: &GeometryCollection<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for GeometryCollection<F>
impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for GeometryCollection<F>
fn relate(&self, other: &GeometryCollection<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for Line<F>
impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for Line<F>
fn relate(&self, other: &GeometryCollection<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for LineString<F>
impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for LineString<F>
fn relate(&self, other: &GeometryCollection<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for MultiLineString<F>
impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for MultiLineString<F>
fn relate(&self, other: &GeometryCollection<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for MultiPoint<F>
impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for MultiPoint<F>
fn relate(&self, other: &GeometryCollection<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for MultiPolygon<F>
impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for MultiPolygon<F>
fn relate(&self, other: &GeometryCollection<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for Point<F>
impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for Point<F>
fn relate(&self, other: &GeometryCollection<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for Polygon<F>
impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for Polygon<F>
fn relate(&self, other: &GeometryCollection<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for Rect<F>
impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for Rect<F>
fn relate(&self, other: &GeometryCollection<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for Triangle<F>
impl<F: GeoFloat> Relate<F, GeometryCollection<F>> for Triangle<F>
fn relate(&self, other: &GeometryCollection<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, Line<F>> for GeometryCollection<F>
impl<F: GeoFloat> Relate<F, Line<F>> for GeometryCollection<F>
fn relate(&self, other: &Line<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, LineString<F>> for GeometryCollection<F>
impl<F: GeoFloat> Relate<F, LineString<F>> for GeometryCollection<F>
fn relate(&self, other: &LineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiLineString<F>> for GeometryCollection<F>
impl<F: GeoFloat> Relate<F, MultiLineString<F>> for GeometryCollection<F>
fn relate(&self, other: &MultiLineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiPoint<F>> for GeometryCollection<F>
impl<F: GeoFloat> Relate<F, MultiPoint<F>> for GeometryCollection<F>
fn relate(&self, other: &MultiPoint<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiPolygon<F>> for GeometryCollection<F>
impl<F: GeoFloat> Relate<F, MultiPolygon<F>> for GeometryCollection<F>
fn relate(&self, other: &MultiPolygon<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, Point<F>> for GeometryCollection<F>
impl<F: GeoFloat> Relate<F, Point<F>> for GeometryCollection<F>
fn relate(&self, other: &Point<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, Polygon<F>> for GeometryCollection<F>
impl<F: GeoFloat> Relate<F, Polygon<F>> for GeometryCollection<F>
fn relate(&self, other: &Polygon<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, Rect<F>> for GeometryCollection<F>
impl<F: GeoFloat> Relate<F, Rect<F>> for GeometryCollection<F>
fn relate(&self, other: &Rect<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, Triangle<F>> for GeometryCollection<F>
impl<F: GeoFloat> Relate<F, Triangle<F>> for GeometryCollection<F>
fn relate(&self, other: &Triangle<F>) -> IntersectionMatrix
source§impl<T> RelativeEq<GeometryCollection<T>> for GeometryCollection<T>where
T: AbsDiffEq<T, Epsilon = T> + CoordNum + RelativeEq<T>,
impl<T> RelativeEq<GeometryCollection<T>> for GeometryCollection<T>where T: AbsDiffEq<T, Epsilon = T> + CoordNum + RelativeEq<T>,
source§fn relative_eq(
&self,
other: &GeometryCollection<T>,
epsilon: <GeometryCollection<T> as AbsDiffEq<GeometryCollection<T>>>::Epsilon,
max_relative: <GeometryCollection<T> as AbsDiffEq<GeometryCollection<T>>>::Epsilon
) -> bool
fn relative_eq( &self, other: &GeometryCollection<T>, epsilon: <GeometryCollection<T> as AbsDiffEq<GeometryCollection<T>>>::Epsilon, max_relative: <GeometryCollection<T> as AbsDiffEq<GeometryCollection<T>>>::Epsilon ) -> bool
Equality assertion within a relative limit.
Examples
use geo_types::{GeometryCollection, point};
let a = GeometryCollection::new_from(vec![point![x: 1.0, y: 2.0].into()]);
let b = GeometryCollection::new_from(vec![point![x: 1.0, y: 2.01].into()]);
approx::assert_relative_eq!(a, b, max_relative=0.1);
approx::assert_relative_ne!(a, b, max_relative=0.0001);
source§fn default_max_relative(
) -> <GeometryCollection<T> as AbsDiffEq<GeometryCollection<T>>>::Epsilon
fn default_max_relative( ) -> <GeometryCollection<T> as AbsDiffEq<GeometryCollection<T>>>::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 GeometryCollection<T>where
T: CoordNum + FromPrimitive,
impl<T> RemoveRepeatedPoints<T> for GeometryCollection<T>where T: CoordNum + FromPrimitive,
source§fn remove_repeated_points(&self) -> Self
fn remove_repeated_points(&self) -> Self
Create a GeometryCollection with (consecutive) repeated points of its geometries removed.
source§fn remove_repeated_points_mut(&mut self)
fn remove_repeated_points_mut(&mut self)
Remove (consecutive) repeated points of its geometries from a GeometryCollection inplace.
source§impl<T> Serialize for GeometryCollection<T>where
T: CoordNum + Serialize,
impl<T> Serialize for GeometryCollection<T>where T: CoordNum + Serialize,
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
impl<T> Eq for GeometryCollection<T>where T: Eq + CoordNum,
impl<T> StructuralEq for GeometryCollection<T>where T: CoordNum,
impl<T> StructuralPartialEq for GeometryCollection<T>where T: CoordNum,
Auto Trait Implementations§
impl<T> RefUnwindSafe for GeometryCollection<T>where T: RefUnwindSafe,
impl<T> Send for GeometryCollection<T>where T: Send,
impl<T> Sync for GeometryCollection<T>where T: Sync,
impl<T> Unpin for GeometryCollection<T>where T: Unpin,
impl<T> UnwindSafe for GeometryCollection<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T, M> AffineOps<T> for Mwhere
T: CoordNum,
M: MapCoordsInPlace<T> + MapCoords<T, T, Output = M>,
impl<T, M> AffineOps<T> for Mwhere T: CoordNum, M: MapCoordsInPlace<T> + MapCoords<T, T, Output = 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<G, T, U> Convert<T, U> for Gwhere
T: CoordNum,
U: CoordNum + From<T>,
G: MapCoords<T, U>,
impl<G, T, U> Convert<T, U> for Gwhere T: CoordNum, U: CoordNum + From<T>, G: MapCoords<T, U>,
source§impl<'a, T, G> ConvexHull<'a, T> for Gwhere
T: GeoNum,
G: CoordsIter<'a, Scalar = T>,
impl<'a, T, G> ConvexHull<'a, T> for Gwhere T: GeoNum, G: CoordsIter<'a, Scalar = T>,
source§impl<'a, T, G> Extremes<'a, T> for Gwhere
G: CoordsIter<'a, Scalar = T>,
T: CoordNum,
impl<'a, T, G> Extremes<'a, T> for Gwhere G: CoordsIter<'a, Scalar = T>, T: CoordNum,
source§impl<'a, T, G> MinimumRotatedRect<'a, T> for Gwhere
T: CoordFloat + GeoFloat + GeoNum,
G: CoordsIter<'a, Scalar = T>,
impl<'a, T, G> MinimumRotatedRect<'a, T> for Gwhere T: CoordFloat + GeoFloat + GeoNum, G: CoordsIter<'a, Scalar = T>,
type Scalar = T
fn minimum_rotated_rect( &'a self ) -> Option<Polygon<<G as MinimumRotatedRect<'a, T>>::Scalar>>
source§impl<G, IP, IR, T> Rotate<T> for Gwhere
T: CoordFloat,
IP: Into<Option<Point<T>>>,
IR: Into<Option<Rect<T>>>,
G: Clone + Centroid<Output = IP> + BoundingRect<T, Output = IR> + AffineOps<T>,
impl<G, IP, IR, T> Rotate<T> for Gwhere T: CoordFloat, IP: Into<Option<Point<T>>>, IR: Into<Option<Rect<T>>>, G: Clone + Centroid<Output = IP> + BoundingRect<T, Output = IR> + AffineOps<T>,
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
.