Struct geo::MultiPolygon
[−]
[src]
pub struct MultiPolygon<T>(pub Vec<Polygon<T>>)
where
T: CoordinateType;
A collection of Polygon
s
Can be created from a Vec
of Polygon
s, or collect
ed from an Iterator which yields Polygon
s.
Iterating over this object yields the component Polygons.
Trait Implementations
impl<'de, T> Deserialize<'de> for MultiPolygon<T> where
T: CoordinateType + Deserialize<'de>,
[src]
T: CoordinateType + Deserialize<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<MultiPolygon<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<MultiPolygon<T>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T> IntoIterator for MultiPolygon<T> where
T: CoordinateType,
[src]
T: CoordinateType,
type Item = Polygon<T>
The type of the elements being iterated over.
type IntoIter = IntoIter<Polygon<T>>
Which kind of iterator are we turning this into?
fn into_iter(self) -> <MultiPolygon<T> as IntoIterator>::IntoIter
[src]
Creates an iterator from a value. Read more
impl<T> Serialize for MultiPolygon<T> where
T: CoordinateType + Serialize,
[src]
T: CoordinateType + Serialize,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T, IP> FromIterator<IP> for MultiPolygon<T> where
IP: Into<Polygon<T>>,
T: CoordinateType,
[src]
IP: Into<Polygon<T>>,
T: CoordinateType,
fn from_iter<I>(iter: I) -> MultiPolygon<T> where
I: IntoIterator<Item = IP>,
[src]
I: IntoIterator<Item = IP>,
Creates a value from an iterator. Read more
impl<T> PartialEq<MultiPolygon<T>> for MultiPolygon<T> where
T: PartialEq<T> + CoordinateType,
[src]
T: PartialEq<T> + CoordinateType,
fn eq(&self, __arg_0: &MultiPolygon<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &MultiPolygon<T>) -> bool
[src]
This method tests for !=
.
impl<T> From<MultiPolygon<T>> for Geometry<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn from(x: MultiPolygon<T>) -> Geometry<T>
[src]
Performs the conversion.
impl<T, IP> From<IP> for MultiPolygon<T> where
IP: Into<Polygon<T>>,
T: CoordinateType,
[src]
IP: Into<Polygon<T>>,
T: CoordinateType,
fn from(x: IP) -> MultiPolygon<T>
[src]
Performs the conversion.
impl<T> Clone for MultiPolygon<T> where
T: Clone + CoordinateType,
[src]
T: Clone + CoordinateType,
fn clone(&self) -> MultiPolygon<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T> Debug for MultiPolygon<T> where
T: Debug + CoordinateType,
[src]
T: Debug + CoordinateType,
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<T> Centroid<T> for MultiPolygon<T> where
T: Float + FromPrimitive,
[src]
T: Float + FromPrimitive,
type Output = Option<Point<T>>
fn centroid(&self) -> Self::Output
[src]
See: https://en.wikipedia.org/wiki/Centroid Read more
impl<T> Contains<Point<T>> for MultiPolygon<T> where
T: Float,
[src]
T: Float,
fn contains(&self, p: &Point<T>) -> bool
[src]
Checks if the geometry A is completely inside the B geometry. Read more
impl<T> Area<T> for MultiPolygon<T> where
T: Float,
[src]
T: Float,
impl<T> EuclideanDistance<T, MultiPolygon<T>> for Point<T> where
T: Float,
[src]
T: Float,
fn euclidean_distance(&self, mpolygon: &MultiPolygon<T>) -> T
[src]
Minimum distance from a Point to a MultiPolygon
impl<T> EuclideanDistance<T, Point<T>> for MultiPolygon<T> where
T: Float,
[src]
T: Float,
fn euclidean_distance(&self, point: &Point<T>) -> T
[src]
Minimum distance from a MultiPolygon to a Point
impl<T> BoundingBox<T> for MultiPolygon<T> where
T: CoordinateType,
[src]
T: CoordinateType,
type Output = Option<Bbox<T>>
fn bbox(&self) -> Self::Output
[src]
Return the BoundingBox for a MultiPolygon
impl<T> Simplify<T> for MultiPolygon<T> where
T: Float,
[src]
T: Float,
fn simplify(&self, epsilon: &T) -> MultiPolygon<T>
[src]
Returns the simplified representation of a geometry, using the Ramer–Douglas–Peucker algorithm Read more
impl<T> SimplifyVWPreserve<T> for MultiPolygon<T> where
T: Float + SpadeFloat,
[src]
T: Float + SpadeFloat,
fn simplifyvw_preserve(&self, epsilon: &T) -> MultiPolygon<T>
[src]
Returns the simplified representation of a geometry, using a topology-preserving variant of the Visvalingam-Whyatt algorithm. Read more
impl<T> SimplifyVW<T> for MultiPolygon<T> where
T: Float,
[src]
T: Float,
fn simplifyvw(&self, epsilon: &T) -> MultiPolygon<T>
[src]
Returns the simplified representation of a geometry, using the Visvalingam-Whyatt algorithm Read more
impl<T> ConvexHull<T> for MultiPolygon<T> where
T: Float,
[src]
T: Float,
fn convex_hull(&self) -> Polygon<T>
[src]
Returns the convex hull of a Polygon. The hull is always oriented counter-clockwise. Read more
impl<T> Orient<T> for MultiPolygon<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn orient(&self, direction: Direction) -> MultiPolygon<T>
[src]
Orients a Polygon's exterior and interior rings according to convention Read more
impl<T> ExtremeIndices<T> for MultiPolygon<T> where
T: Float + Signed,
[src]
T: Float + Signed,
fn extreme_indices(&self) -> Result<Extremes, ()>
[src]
Find the extreme x
and y
indices of a convex Polygon Read more
impl<T> Rotate<T> for MultiPolygon<T> where
T: Float + FromPrimitive,
[src]
T: Float + FromPrimitive,
fn rotate(&self, angle: T) -> Self
[src]
Rotate the contained Polygons about their centroids by the given number of degrees
impl<T: CoordinateType, NT: CoordinateType> MapCoords<T, NT> for MultiPolygon<T>
[src]
type Output = MultiPolygon<NT>
fn map_coords(&self, func: &Fn(&(T, T)) -> (NT, NT)) -> Self::Output
[src]
Apply a function to all the coordinates in a geometric object, returning a new object. Read more
impl<T: CoordinateType, NT: CoordinateType> TryMapCoords<T, NT> for MultiPolygon<T>
[src]
type Output = MultiPolygon<NT>
fn try_map_coords(
&self,
func: &Fn(&(T, T)) -> Result<(NT, NT), Error>
) -> Result<Self::Output, Error>
[src]
&self,
func: &Fn(&(T, T)) -> Result<(NT, NT), Error>
) -> Result<Self::Output, Error>
Map a fallible function over all the coordinates in a geometry, returning a Result Read more
impl<T: CoordinateType> MapCoordsInplace<T> for MultiPolygon<T>
[src]
fn map_coords_inplace(&mut self, func: &Fn(&(T, T)) -> (T, T))
[src]
Apply a function to all the coordinates in a geometric object, in place Read more
impl<F: Float> ClosestPoint<F> for MultiPolygon<F>
[src]
fn closest_point(&self, p: &Point<F>) -> Closest<F>
[src]
Find the closest point between self
and p
.
Auto Trait Implementations
impl<T> Send for MultiPolygon<T> where
T: Send,
T: Send,
impl<T> Sync for MultiPolygon<T> where
T: Sync,
T: Sync,