Struct geo_types::geometry::MultiPolygon
source · pub struct MultiPolygon<T: CoordNum = f64>(pub Vec<Polygon<T>>);
Expand description
A collection of Polygon
s. Can
be created from a Vec
of Polygon
s, or from an
Iterator which yields Polygon
s. Iterating over this
object yields the component Polygon
s.
§Semantics
The interior and the boundary are the union of the interior and the boundary of the constituent polygons.
§Validity
-
The interiors of no two constituent polygons may intersect.
-
The boundaries of two (distinct) constituent polygons may only intersect at finitely many points.
Refer to section 6.1.14 of the OGC-SFA for a formal definition of validity. Note that the validity is not enforced, but expected by the operations and predicates that operate on it.
Tuple Fields§
§0: Vec<Polygon<T>>
Implementations§
Trait Implementations§
source§impl<T: Clone + CoordNum> Clone for MultiPolygon<T>
impl<T: Clone + CoordNum> Clone for MultiPolygon<T>
source§fn clone(&self) -> MultiPolygon<T>
fn clone(&self) -> MultiPolygon<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T: CoordNum> From<MultiPolygon<T>> for Geometry<T>
impl<T: CoordNum> From<MultiPolygon<T>> for Geometry<T>
source§fn from(x: MultiPolygon<T>) -> Self
fn from(x: MultiPolygon<T>) -> Self
Converts to this type from the input type.
source§impl<T: CoordNum, IP: Into<Polygon<T>>> FromIterator<IP> for MultiPolygon<T>
impl<T: CoordNum, IP: Into<Polygon<T>>> FromIterator<IP> for MultiPolygon<T>
source§fn from_iter<I: IntoIterator<Item = IP>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = IP>>(iter: I) -> Self
Creates a value from an iterator. Read more
source§impl<'a, T: CoordNum> IntoIterator for &'a MultiPolygon<T>
impl<'a, T: CoordNum> IntoIterator for &'a MultiPolygon<T>
source§impl<'a, T: CoordNum> IntoIterator for &'a mut MultiPolygon<T>
impl<'a, T: CoordNum> IntoIterator for &'a mut MultiPolygon<T>
source§impl<T: CoordNum> IntoIterator for MultiPolygon<T>
impl<T: CoordNum> IntoIterator for MultiPolygon<T>
source§impl<T: PartialEq + CoordNum> PartialEq for MultiPolygon<T>
impl<T: PartialEq + CoordNum> PartialEq for MultiPolygon<T>
source§fn eq(&self, other: &MultiPolygon<T>) -> bool
fn eq(&self, other: &MultiPolygon<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T: CoordNum> TryFrom<Geometry<T>> for MultiPolygon<T>
impl<T: CoordNum> TryFrom<Geometry<T>> for MultiPolygon<T>
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 + CoordNum> Eq for MultiPolygon<T>
impl<T: CoordNum> StructuralPartialEq for MultiPolygon<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for MultiPolygon<T>where
T: RefUnwindSafe,
impl<T> Send for MultiPolygon<T>where
T: Send,
impl<T> Sync for MultiPolygon<T>where
T: Sync,
impl<T> Unpin for MultiPolygon<T>where
T: Unpin,
impl<T> UnwindSafe for MultiPolygon<T>where
T: UnwindSafe,
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