Struct geo_types::MultiPoint [−][src]
Expand description
A collection of Points. Can
be created from a Vec of Points, or from an
Iterator which yields Points. Iterating over this
object yields the component Points.
Semantics
The interior and the boundary are the union of the
interior and the boundary of the constituent points. In
particular, the boundary of a MultiPoint is always
empty.
Examples
Iterating over a MultiPoint yields the Points inside.
use geo_types::{MultiPoint, Point};
let points: MultiPoint<_> = vec![(0., 0.), (1., 2.)].into();
for point in points {
println!("Point x = {}, y = {}", point.x(), point.y());
}Tuple Fields
0: Vec<Point<T>>Implementations
Trait Implementations
impl<T> AbsDiffEq<MultiPoint<T>> for MultiPoint<T> where
T: AbsDiffEq<Epsilon = T> + CoordNum,
T::Epsilon: Copy,
impl<T> AbsDiffEq<MultiPoint<T>> for MultiPoint<T> where
T: AbsDiffEq<Epsilon = T> + CoordNum,
T::Epsilon: Copy,
Equality assertion with an absolute limit.
Examples
use geo_types::MultiPoint;
use geo_types::point;
let a = MultiPoint(vec![point![x: 0., y: 0.], point![x: 10., y: 10.]]);
let b = MultiPoint(vec![point![x: 0., y: 0.], point![x: 10.001, y: 10.]]);
approx::abs_diff_eq!(a, b, epsilon=0.1);type Epsilon = T
type Epsilon = T
Used for specifying relative comparisons.
The default tolerance to use when testing values that are close together. Read more
The inverse of AbsDiffEq::abs_diff_eq.
Convert a single Point (or something which can be converted to a Point) into a
one-member MultiPoint
Performs the conversion.
Convert a Vec of Points (or Vec of things which can be converted to a Point) into a
MultiPoint.
Collect the results of a Point iterator into a MultiPoint
Iterate over the Points in this MultiPoint.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
impl<T> RelativeEq<MultiPoint<T>> for MultiPoint<T> where
T: AbsDiffEq<Epsilon = T> + CoordNum + RelativeEq,
impl<T> RelativeEq<MultiPoint<T>> for MultiPoint<T> where
T: AbsDiffEq<Epsilon = T> + CoordNum + RelativeEq,
Equality assertion within a relative limit.
Examples
use geo_types::MultiPoint;
use geo_types::point;
let a = MultiPoint(vec![point![x: 0., y: 0.], point![x: 10., y: 10.]]);
let b = MultiPoint(vec![point![x: 0., y: 0.], point![x: 10.001, y: 10.]]);
approx::assert_relative_eq!(a, b, max_relative=0.1)The default relative tolerance for testing values that are far-apart. Read more
The inverse of RelativeEq::relative_eq.
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.
Auto Trait Implementations
impl<T> RefUnwindSafe for MultiPoint<T> where
T: RefUnwindSafe,
impl<T> Send for MultiPoint<T> where
T: Send,
impl<T> Sync for MultiPoint<T> where
T: Sync,
impl<T> Unpin for MultiPoint<T> where
T: Unpin,
impl<T> UnwindSafe for MultiPoint<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
