geo::geometry

Struct MultiPolygon

Source
pub struct MultiPolygon<T = f64>(pub Vec<Polygon<T>>)
where
    T: CoordNum;
Expand description

A collection of Polygons. Can be created from a Vec of Polygons, or from an Iterator which yields Polygons. Iterating over this object yields the component Polygons.

§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§

Source§

impl<T> MultiPolygon<T>
where T: CoordNum,

Source

pub fn new(value: Vec<Polygon<T>>) -> MultiPolygon<T>

Instantiate Self from the raw content value

Source

pub fn iter(&self) -> impl Iterator<Item = &Polygon<T>>

Source

pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut Polygon<T>>

Trait Implementations§

Source§

impl<T> AbsDiffEq for MultiPolygon<T>
where T: AbsDiffEq<Epsilon = T> + CoordNum, <T as AbsDiffEq>::Epsilon: Copy,

Source§

fn abs_diff_eq( &self, other: &MultiPolygon<T>, epsilon: <MultiPolygon<T> as AbsDiffEq>::Epsilon, ) -> bool

Equality assertion with an absolute limit.

§Examples
use geo_types::{polygon, Polygon, MultiPolygon};

let a_el: Polygon<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7., y: 9.), (x: 0., y: 0.)];
let a = MultiPolygon::new(vec![a_el]);
let b_el: Polygon<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7.01, y: 9.), (x: 0., y: 0.)];
let b = MultiPolygon::new(vec![b_el]);

approx::abs_diff_eq!(a, b, epsilon=0.1);
approx::abs_diff_ne!(a, b, epsilon=0.001);
Source§

type Epsilon = T

Used for specifying relative comparisons.
Source§

fn default_epsilon() -> <MultiPolygon<T> as AbsDiffEq>::Epsilon

The default tolerance to use when testing values that are close together. Read more
Source§

fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool

The inverse of AbsDiffEq::abs_diff_eq.
Source§

impl<T> Area<T> for MultiPolygon<T>
where T: CoordFloat,

Note. The implementation is a straight-forward summation of the signed areas of the individual polygons. In particular, unsigned_area is not necessarily the sum of the unsigned_area of the constituent polygons unless they are all oriented the same.

Source§

fn signed_area(&self) -> T

Source§

fn unsigned_area(&self) -> T

Source§

impl<T: BoolOpsNum> BooleanOps for MultiPolygon<T>

Source§

type Scalar = T

Source§

fn rings(&self) -> impl Iterator<Item = &LineString<Self::Scalar>>

The exterior and interior rings of the geometry. Read more
Source§

fn boolean_op( &self, other: &impl BooleanOps<Scalar = Self::Scalar>, op: OpType, ) -> MultiPolygon<Self::Scalar>

Source§

fn intersection( &self, other: &impl BooleanOps<Scalar = Self::Scalar>, ) -> MultiPolygon<Self::Scalar>

Source§

fn union( &self, other: &impl BooleanOps<Scalar = Self::Scalar>, ) -> MultiPolygon<Self::Scalar>

Source§

fn xor( &self, other: &impl BooleanOps<Scalar = Self::Scalar>, ) -> MultiPolygon<Self::Scalar>

Source§

fn difference( &self, other: &impl BooleanOps<Scalar = Self::Scalar>, ) -> MultiPolygon<Self::Scalar>

Source§

fn clip( &self, multi_line_string: &MultiLineString<Self::Scalar>, invert: bool, ) -> MultiLineString<Self::Scalar>

Clip a 1-D geometry with self. Read more
Source§

impl<T> BoundingRect<T> for MultiPolygon<T>
where T: CoordNum,

Source§

fn bounding_rect(&self) -> Self::Output

Return the BoundingRect for a MultiPolygon

Source§

type Output = Option<Rect<T>>

Source§

impl<T> Centroid for MultiPolygon<T>
where T: GeoFloat,

Source§

fn centroid(&self) -> Self::Output

The Centroid of a MultiPolygon is the mean of the centroids of its polygons, weighted by the area of the polygons

§Examples
use geo::Centroid;
use geo::{MultiPolygon, polygon, point};

let multi_polygon = MultiPolygon::new(vec![
  // centroid (1.0, 0.5)
  polygon![
    (x: 0.0f32, y: 0.0),
    (x: 2.0, y: 0.0),
    (x: 2.0, y: 1.0),
    (x: 0.0, y: 1.0),
  ],
  // centroid (-0.5, 0.0)
  polygon![
    (x: 1.0, y: 1.0),
    (x: -2.0, y: 1.0),
    (x: -2.0, y: -1.0),
    (x: 1.0, y: -1.0),
  ]
]);

assert_eq!(
    // ( 2.0 * (1.0, 0.5) + 6.0 * (-0.5, 0.0) ) / 8.0
    Some(point!(x: -0.125, y: 0.125)),
    multi_polygon.centroid(),
);
Source§

type Output = Option<Point<T>>

Source§

impl<T> ChaikinSmoothing<T> for MultiPolygon<T>

Source§

fn chaikin_smoothing(&self, n_iterations: usize) -> Self

create a new geometry with the Chaikin smoothing being applied n_iterations times.
Source§

impl<T> ChamberlainDuquetteArea<T> for MultiPolygon<T>
where T: CoordFloat,

Source§

impl<T> Clone for MultiPolygon<T>
where T: Clone + CoordNum,

Source§

fn clone(&self) -> MultiPolygon<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<F: GeoFloat> ClosestPoint<F> for MultiPolygon<F>

Source§

fn closest_point(&self, p: &Point<F>) -> Closest<F>

Find the closest point between self and p.
Source§

impl<T> ConcaveHull for MultiPolygon<T>
where T: GeoFloat + RTreeNum,

Source§

type Scalar = T

Source§

fn concave_hull(&self, concavity: Self::Scalar) -> Polygon<Self::Scalar>

Source§

impl<T> Contains<Coord<T>> for MultiPolygon<T>
where T: GeoNum,

Source§

fn contains(&self, coord: &Coord<T>) -> bool

Source§

impl<F> Contains<GeometryCollection<F>> for MultiPolygon<F>
where F: GeoFloat,

Source§

impl<F> Contains<Line<F>> for MultiPolygon<F>
where F: GeoFloat,

Source§

fn contains(&self, rhs: &Line<F>) -> bool

Source§

impl<F> Contains<LineString<F>> for MultiPolygon<F>
where F: GeoFloat,

Source§

fn contains(&self, rhs: &LineString<F>) -> bool

Source§

impl<F> Contains<MultiLineString<F>> for MultiPolygon<F>
where F: GeoFloat,

Source§

fn contains(&self, rhs: &MultiLineString<F>) -> bool

Source§

impl<T: GeoNum> Contains<MultiPoint<T>> for MultiPolygon<T>

Source§

fn contains(&self, rhs: &MultiPoint<T>) -> bool

Source§

impl<T> Contains<MultiPolygon<T>> for Geometry<T>
where T: GeoFloat,

Source§

fn contains(&self, multi_line_string: &MultiPolygon<T>) -> bool

Source§

impl<T> Contains<MultiPolygon<T>> for GeometryCollection<T>
where T: GeoFloat,

Source§

fn contains(&self, target: &MultiPolygon<T>) -> bool

Source§

impl<T> Contains<MultiPolygon<T>> for Line<T>
where T: GeoFloat,

Source§

fn contains(&self, target: &MultiPolygon<T>) -> bool

Source§

impl<T> Contains<MultiPolygon<T>> for LineString<T>
where T: GeoFloat,

Source§

fn contains(&self, target: &MultiPolygon<T>) -> bool

Source§

impl<T> Contains<MultiPolygon<T>> for MultiLineString<T>
where T: GeoFloat,

Source§

fn contains(&self, target: &MultiPolygon<T>) -> bool

Source§

impl<T> Contains<MultiPolygon<T>> for MultiPoint<T>
where T: GeoFloat,

Source§

fn contains(&self, target: &MultiPolygon<T>) -> bool

Source§

impl<T> Contains<MultiPolygon<T>> for Point<T>
where T: CoordNum,

Source§

fn contains(&self, multi_polygon: &MultiPolygon<T>) -> bool

Source§

impl<T> Contains<MultiPolygon<T>> for Polygon<T>
where T: GeoFloat,

Source§

fn contains(&self, target: &MultiPolygon<T>) -> bool

Source§

impl<T> Contains<MultiPolygon<T>> for Rect<T>
where T: GeoFloat,

Source§

fn contains(&self, target: &MultiPolygon<T>) -> bool

Source§

impl<T> Contains<MultiPolygon<T>> for Triangle<T>
where T: GeoFloat,

Source§

fn contains(&self, target: &MultiPolygon<T>) -> bool

Source§

impl<T> Contains<Point<T>> for MultiPolygon<T>
where T: GeoNum,

Source§

fn contains(&self, p: &Point<T>) -> bool

Source§

impl<F> Contains<Polygon<F>> for MultiPolygon<F>
where F: GeoFloat,

Source§

fn contains(&self, rhs: &Polygon<F>) -> bool

Source§

impl<F> Contains<Rect<F>> for MultiPolygon<F>
where F: GeoFloat,

Source§

fn contains(&self, rhs: &Rect<F>) -> bool

Source§

impl<F> Contains<Triangle<F>> for MultiPolygon<F>
where F: GeoFloat,

Source§

fn contains(&self, rhs: &Triangle<F>) -> bool

Source§

impl<F> Contains for MultiPolygon<F>
where F: GeoFloat,

Source§

fn contains(&self, rhs: &MultiPolygon<F>) -> bool

Source§

impl<T> CoordinatePosition for MultiPolygon<T>
where T: GeoNum,

Source§

type Scalar = T

Source§

fn calculate_coordinate_position( &self, coord: &Coord<T>, is_inside: &mut bool, boundary_count: &mut usize, )

Source§

fn coordinate_position(&self, coord: &Coord<Self::Scalar>) -> CoordPos

Source§

impl<T: CoordNum> CoordsIter for MultiPolygon<T>

Source§

fn coords_count(&self) -> usize

Return the number of coordinates in the MultiPolygon.

Source§

type Iter<'a> = Flatten<MapCoordsIter<'a, T, Iter<'a, Polygon<T>>, Polygon<T>>> where T: 'a

Source§

type ExteriorIter<'a> = Flatten<MapExteriorCoordsIter<'a, T, Iter<'a, Polygon<T>>, Polygon<T>>> where T: 'a

Source§

type Scalar = T

Source§

fn coords_iter(&self) -> Self::Iter<'_>

Iterate over all exterior and (if any) interior coordinates of a geometry. Read more
Source§

fn exterior_coords_iter(&self) -> Self::ExteriorIter<'_>

Iterate over all exterior coordinates of a geometry. Read more
Source§

impl<T> Debug for MultiPolygon<T>
where T: Debug + CoordNum,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<F: CoordFloat + FromPrimitive> Densify<F> for MultiPolygon<F>

Source§

type Output = MultiPolygon<F>

Source§

fn densify<MetricSpace>(&self, max_segment_length: F) -> Self::Output
where MetricSpace: Distance<F, Point<F>, Point<F>> + InterpolatePoint<F>,

Source§

impl<T> DensifyHaversine<T> for MultiPolygon<T>

Source§

type Output = MultiPolygon<T>

👎Deprecated since 0.29.0: Please use the line.densify::<Haversine>() via the Densify trait instead.
Source§

fn densify_haversine(&self, max_distance: T) -> Self::Output

👎Deprecated since 0.29.0: Please use the line.densify::<Haversine>() via the Densify trait instead.
Source§

impl<F> Distance<F, &Geometry<F>, &MultiPolygon<F>> for Euclidean
where F: GeoFloat,

Source§

fn distance(a: &Geometry<F>, b: &MultiPolygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F> Distance<F, &GeometryCollection<F>, &MultiPolygon<F>> for Euclidean
where F: GeoFloat,

Source§

fn distance(a: &GeometryCollection<F>, b: &MultiPolygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F> Distance<F, &Line<F>, &MultiPolygon<F>> for Euclidean
where F: GeoFloat,

Source§

fn distance(a: &Line<F>, b: &MultiPolygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F> Distance<F, &LineString<F>, &MultiPolygon<F>> for Euclidean
where F: GeoFloat,

Source§

fn distance(a: &LineString<F>, b: &MultiPolygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiLineString<F>, &MultiPolygon<F>> for Euclidean

Source§

fn distance( iter_geometry: &MultiLineString<F>, to_geometry: &MultiPolygon<F>, ) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiPoint<F>, &MultiPolygon<F>> for Euclidean

Source§

fn distance(iter_geometry: &MultiPoint<F>, to_geometry: &MultiPolygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Geometry<F>> for Euclidean

Source§

fn distance(origin: &MultiPolygon<F>, destination: &Geometry<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &GeometryCollection<F>> for Euclidean

Source§

fn distance( iter_geometry: &MultiPolygon<F>, to_geometry: &GeometryCollection<F>, ) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Line<F>> for Euclidean

Source§

fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Line<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &LineString<F>> for Euclidean

Source§

fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &LineString<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F> Distance<F, &MultiPolygon<F>, &MultiLineString<F>> for Euclidean
where F: GeoFloat,

Source§

fn distance(a: &MultiPolygon<F>, b: &MultiLineString<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F> Distance<F, &MultiPolygon<F>, &MultiPoint<F>> for Euclidean
where F: GeoFloat,

Source§

fn distance(a: &MultiPolygon<F>, b: &MultiPoint<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &MultiPolygon<F>> for Euclidean

Source§

fn distance(origin: &MultiPolygon<F>, destination: &MultiPolygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Point<F>> for Euclidean

Source§

fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Point<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Polygon<F>> for Euclidean

Source§

fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Polygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Rect<F>> for Euclidean

Source§

fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Rect<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F: GeoFloat> Distance<F, &MultiPolygon<F>, &Triangle<F>> for Euclidean

Source§

fn distance(iter_geometry: &MultiPolygon<F>, to_geometry: &Triangle<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F> Distance<F, &Point<F>, &MultiPolygon<F>> for Euclidean
where F: GeoFloat,

Source§

fn distance(a: &Point<F>, b: &MultiPolygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F> Distance<F, &Polygon<F>, &MultiPolygon<F>> for Euclidean
where F: GeoFloat,

Source§

fn distance(a: &Polygon<F>, b: &MultiPolygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F> Distance<F, &Rect<F>, &MultiPolygon<F>> for Euclidean
where F: GeoFloat,

Source§

fn distance(a: &Rect<F>, b: &MultiPolygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<F> Distance<F, &Triangle<F>, &MultiPolygon<F>> for Euclidean
where F: GeoFloat,

Source§

fn distance(a: &Triangle<F>, b: &MultiPolygon<F>) -> F

Note that not all implementations support all geometry combinations, but at least Point to Point is supported. See specific implementations for details. Read more
Source§

impl<T> EuclideanDistance<T> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, Geometry<T>> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, geom: &Geometry<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, GeometryCollection<T>> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, target: &GeometryCollection<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, Line<T>> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, target: &Line<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, LineString<T>> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, target: &LineString<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiLineString<T>> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, target: &MultiLineString<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPoint<T>> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, target: &MultiPoint<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPolygon<T>> for Geometry<T>

Source§

fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPolygon<T>> for GeometryCollection<T>

Source§

fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPolygon<T>> for Line<T>

Source§

fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPolygon<T>> for LineString<T>

Source§

fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPolygon<T>> for MultiLineString<T>

Source§

fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPolygon<T>> for MultiPoint<T>

Source§

fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPolygon<T>> for Point<T>

Source§

fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPolygon<T>> for Polygon<T>

Source§

fn euclidean_distance(&self, target: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPolygon<T>> for Rect<T>

Source§

fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, MultiPolygon<T>> for Triangle<T>

Source§

fn euclidean_distance(&self, other: &MultiPolygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, Point<T>> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, target: &Point<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, Polygon<T>> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, target: &Polygon<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, Rect<T>> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, other: &Rect<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<T> EuclideanDistance<T, Triangle<T>> for MultiPolygon<T>

Source§

fn euclidean_distance(&self, other: &Triangle<T>) -> T

👎Deprecated since 0.29.0: Please use the Euclidean::distance method from the Distance trait instead
Returns the distance between two geometries Read more
Source§

impl<'a, F: GeoFloat> From<&'a MultiPolygon<F>> for PreparedGeometry<'a, F>

Source§

fn from(multi_polygon: &'a MultiPolygon<F>) -> Self

Converts to this type from the input type.
Source§

impl<T, IP> From<IP> for MultiPolygon<T>
where T: CoordNum, IP: Into<Polygon<T>>,

Source§

fn from(x: IP) -> MultiPolygon<T>

Converts to this type from the input type.
Source§

impl<'a, F: GeoFloat> From<MultiPolygon<F>> for PreparedGeometry<'a, F>

Source§

fn from(multi_polygon: MultiPolygon<F>) -> Self

Converts to this type from the input type.
Source§

impl<T> From<MultiPolygon<T>> for Geometry<T>
where T: CoordNum,

Source§

fn from(x: MultiPolygon<T>) -> Geometry<T>

Converts to this type from the input type.
Source§

impl<T: GeoNum> From<MultiPolygon<T>> for MonotonicPolygons<T>

Source§

fn from(mp: MultiPolygon<T>) -> Self

Converts to this type from the input type.
Source§

impl<T, IP> From<Vec<IP>> for MultiPolygon<T>
where T: CoordNum, IP: Into<Polygon<T>>,

Source§

fn from(x: Vec<IP>) -> MultiPolygon<T>

Converts to this type from the input type.
Source§

impl<T, IP> FromIterator<IP> for MultiPolygon<T>
where T: CoordNum, IP: Into<Polygon<T>>,

Source§

fn from_iter<I>(iter: I) -> MultiPolygon<T>
where I: IntoIterator<Item = IP>,

Creates a value from an iterator. Read more
Source§

impl GeodesicArea<f64> for MultiPolygon

Source§

fn geodesic_perimeter(&self) -> f64

Determine the perimeter of a geometry on an ellipsoidal model of the earth. Read more
Source§

fn geodesic_area_signed(&self) -> f64

Determine the area of a geometry on an ellipsoidal model of the earth. Read more
Source§

fn geodesic_area_unsigned(&self) -> f64

Determine the area of a geometry on an ellipsoidal model of the earth. Supports very large geometries that cover a significant portion of the earth. Read more
Source§

fn geodesic_perimeter_area_signed(&self) -> (f64, f64)

Determine the perimeter and area of a geometry on an ellipsoidal model of the earth, all in one operation. Read more
Source§

fn geodesic_perimeter_area_unsigned(&self) -> (f64, f64)

Determine the perimeter and area of a geometry on an ellipsoidal model of the earth, all in one operation. Supports very large geometries that cover a significant portion of the earth. Read more
Source§

impl<C: CoordNum> HasDimensions for MultiPolygon<C>

Source§

fn is_empty(&self) -> bool

Some geometries, like a MultiPoint, can have zero coordinates - we call these empty. Read more
Source§

fn dimensions(&self) -> Dimensions

The dimensions of some geometries are fixed, e.g. a Point always has 0 dimensions. However for others, the dimensionality depends on the specific geometry instance - for example typical Rects are 2-dimensional, but it’s possible to create degenerate Rects which have either 1 or 0 dimensions. Read more
Source§

fn boundary_dimensions(&self) -> Dimensions

The dimensions of the Geometry’s boundary, as used by OGC-SFA. Read more
Source§

impl<T> Hash for MultiPolygon<T>
where T: Hash + CoordNum,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T> HaversineClosestPoint<T> for MultiPolygon<T>

Source§

fn haversine_closest_point(&self, from: &Point<T>) -> Closest<T>

Source§

impl<T> InteriorPoint for MultiPolygon<T>
where T: GeoFloat,

Source§

type Output = Option<Point<T>>

Source§

fn interior_point(&self) -> Self::Output

Calculates a representative point inside the Geometry Read more
Source§

impl<G, T> Intersects<G> for MultiPolygon<T>
where T: GeoNum, Polygon<T>: Intersects<G>, G: BoundingRect<T>,

Source§

fn intersects(&self, rhs: &G) -> bool

Source§

impl<T> Intersects<MultiPolygon<T>> for Line<T>

Source§

fn intersects(&self, rhs: &MultiPolygon<T>) -> bool

Source§

impl<T> Intersects<MultiPolygon<T>> for Point<T>

Source§

fn intersects(&self, rhs: &MultiPolygon<T>) -> bool

Source§

impl<T> Intersects<MultiPolygon<T>> for Polygon<T>

Source§

fn intersects(&self, rhs: &MultiPolygon<T>) -> bool

Source§

impl<T> Intersects<MultiPolygon<T>> for Rect<T>

Source§

fn intersects(&self, rhs: &MultiPolygon<T>) -> bool

Source§

impl<T> Intersects<MultiPolygon<T>> for Triangle<T>

Source§

fn intersects(&self, rhs: &MultiPolygon<T>) -> bool

Source§

impl<'a, T> IntoIterator for &'a MultiPolygon<T>
where T: CoordNum,

Source§

type Item = &'a Polygon<T>

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, Polygon<T>>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> <&'a MultiPolygon<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T> IntoIterator for &'a mut MultiPolygon<T>
where T: CoordNum,

Source§

type Item = &'a mut Polygon<T>

The type of the elements being iterated over.
Source§

type IntoIter = IterMut<'a, Polygon<T>>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> <&'a mut MultiPolygon<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<T> IntoIterator for MultiPolygon<T>
where T: CoordNum,

Source§

type Item = Polygon<T>

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<Polygon<T>>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> <MultiPolygon<T> as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a, T> IntoParallelIterator for &'a MultiPolygon<T>
where T: CoordNum + Sync,

Source§

type Item = &'a Polygon<T>

The type of item that the parallel iterator will produce.
Source§

type Iter = Iter<'a, Polygon<T>>

The parallel iterator type that will be created.
Source§

fn into_par_iter(self) -> <&'a MultiPolygon<T> as IntoParallelIterator>::Iter

Converts self into a parallel iterator. Read more
Source§

impl<'a, T> IntoParallelIterator for &'a mut MultiPolygon<T>
where T: CoordNum + Send + Sync,

Source§

type Item = &'a mut Polygon<T>

The type of item that the parallel iterator will produce.
Source§

type Iter = IterMut<'a, Polygon<T>>

The parallel iterator type that will be created.
Source§

fn into_par_iter( self, ) -> <&'a mut MultiPolygon<T> as IntoParallelIterator>::Iter

Converts self into a parallel iterator. Read more
Source§

impl<T> IntoParallelIterator for MultiPolygon<T>
where T: CoordNum + Send,

Source§

type Item = Polygon<T>

The type of item that the parallel iterator will produce.
Source§

type Iter = IntoIter<Polygon<T>>

The parallel iterator type that will be created.
Source§

fn into_par_iter(self) -> <MultiPolygon<T> as IntoParallelIterator>::Iter

Converts self into a parallel iterator. Read more
Source§

impl<'a, T: CoordNum + 'a> LinesIter<'a> for MultiPolygon<T>

Source§

type Scalar = T

Source§

type Iter = Flatten<MapLinesIter<'a, Iter<'a, Polygon<<MultiPolygon<T> as LinesIter<'a>>::Scalar>>, Polygon<<MultiPolygon<T> as LinesIter<'a>>::Scalar>>>

Source§

fn lines_iter(&'a self) -> Self::Iter

Iterate over all exterior and (if any) interior lines of a geometry. Read more
Source§

impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for MultiPolygon<T>

Source§

type Output = MultiPolygon<NT>

Source§

fn map_coords( &self, func: impl Fn(Coord<T>) -> Coord<NT> + Copy, ) -> Self::Output

Apply a function to all the coordinates in a geometric object, returning a new object. Read more
Source§

fn try_map_coords<E>( &self, func: impl Fn(Coord<T>) -> Result<Coord<NT>, E> + Copy, ) -> Result<Self::Output, E>

Map a fallible function over all the coordinates in a geometry, returning a Result Read more
Source§

impl<T: CoordNum> MapCoordsInPlace<T> for MultiPolygon<T>

Source§

fn map_coords_in_place(&mut self, func: impl Fn(Coord<T>) -> Coord<T> + Copy)

Apply a function to all the coordinates in a geometric object, in place Read more
Source§

fn try_map_coords_in_place<E>( &mut self, func: impl Fn(Coord<T>) -> Result<Coord<T>, E>, ) -> Result<(), E>

Map a fallible function over all the coordinates in a geometry, in place, returning a Result. Read more
Source§

impl<T> Orient for MultiPolygon<T>
where T: GeoNum,

Source§

fn orient(&self, direction: Direction) -> MultiPolygon<T>

Orients a Polygon’s exterior and interior rings according to convention Read more
Source§

impl<T> PartialEq for MultiPolygon<T>
where T: PartialEq + CoordNum,

Source§

fn eq(&self, other: &MultiPolygon<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> RTreeObject for MultiPolygon<T>
where T: Float + RTreeNum,

Source§

type Envelope = AABB<Point<T>>

The object’s envelope type. Usually, AABB will be the right choice. This type also defines the object’s dimensionality.
Source§

fn envelope(&self) -> <MultiPolygon<T> as RTreeObject>::Envelope

Returns the object’s envelope. Read more
Source§

impl<F: GeoFloat> Relate<F> for MultiPolygon<F>

Source§

fn geometry_graph(&self, arg_index: usize) -> GeometryGraph<'_, F>

Construct a GeometryGraph
Source§

fn relate(&self, other: &impl Relate<F>) -> IntersectionMatrix

Source§

impl<T> RelativeEq for MultiPolygon<T>
where T: AbsDiffEq<Epsilon = T> + CoordNum + RelativeEq,

Source§

fn relative_eq( &self, other: &MultiPolygon<T>, epsilon: <MultiPolygon<T> as AbsDiffEq>::Epsilon, max_relative: <MultiPolygon<T> as AbsDiffEq>::Epsilon, ) -> bool

Equality assertion within a relative limit.

§Examples
use geo_types::{polygon, Polygon, MultiPolygon};

let a_el: Polygon<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7., y: 9.), (x: 0., y: 0.)];
let a = MultiPolygon::new(vec![a_el]);
let b_el: Polygon<f32> = polygon![(x: 0., y: 0.), (x: 5., y: 0.), (x: 7.01, y: 9.), (x: 0., y: 0.)];
let b = MultiPolygon::new(vec![b_el]);

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() -> <MultiPolygon<T> as AbsDiffEq>::Epsilon

The default relative tolerance for testing values that are far-apart. Read more
Source§

fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool

The inverse of RelativeEq::relative_eq.
Source§

impl<T> RemoveRepeatedPoints<T> for MultiPolygon<T>

Source§

fn remove_repeated_points(&self) -> Self

Create a MultiPolygon with consecutive repeated points removed.

Source§

fn remove_repeated_points_mut(&mut self)

Remove consecutive repeated points from a MultiPolygon inplace.

Source§

impl<T> Simplify<T> for MultiPolygon<T>
where T: GeoFloat,

Source§

fn simplify(&self, epsilon: &T) -> Self

Returns the simplified representation of a geometry, using the Ramer–Douglas–Peucker algorithm Read more
Source§

impl<T> SimplifyVw<T> for MultiPolygon<T>
where T: CoordFloat,

Source§

fn simplify_vw(&self, epsilon: &T) -> MultiPolygon<T>

Returns the simplified representation of a geometry, using the Visvalingam-Whyatt algorithm Read more
Source§

impl<T> SimplifyVwPreserve<T> for MultiPolygon<T>
where T: GeoFloat + RTreeNum,

Source§

fn simplify_vw_preserve(&self, epsilon: &T) -> MultiPolygon<T>

Returns the simplified representation of a geometry, using a topology-preserving variant of the Visvalingam-Whyatt algorithm. Read more
Source§

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§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from( geom: Geometry<T>, ) -> Result<MultiPolygon<T>, <MultiPolygon<T> as TryFrom<Geometry<T>>>::Error>

Performs the conversion.
Source§

impl<T> Eq for MultiPolygon<T>
where T: Eq + CoordNum,

Source§

impl<T> StructuralPartialEq for MultiPolygon<T>
where T: CoordNum,

Auto Trait Implementations§

§

impl<T> Freeze for MultiPolygon<T>

§

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, M> AffineOps<T> for M
where T: CoordNum, M: MapCoordsInPlace<T> + MapCoords<T, T, Output = M>,

Source§

fn affine_transform(&self, transform: &AffineTransform<T>) -> M

Apply transform immutably, outputting a new geometry.
Source§

fn affine_transform_mut(&mut self, transform: &AffineTransform<T>)

Apply transform to mutate self.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<G, T, U> Convert<T, U> for G
where T: CoordNum, U: CoordNum + From<T>, G: MapCoords<T, U>,

Source§

type Output = <G as MapCoords<T, U>>::Output

Source§

fn convert(&self) -> <G as Convert<T, U>>::Output

Source§

impl<'a, T, G> ConvexHull<'a, T> for G
where T: GeoNum, G: CoordsIter<Scalar = T>,

Source§

type Scalar = T

Source§

fn convex_hull(&'a self) -> Polygon<T>

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<'a, T, G> Extremes<'a, T> for G
where G: CoordsIter<Scalar = T>, T: CoordNum,

Source§

fn extremes(&'a self) -> Option<Outcome<T>>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, G> HausdorffDistance<T> for G
where T: GeoFloat, G: CoordsIter<Scalar = T>,

Source§

fn hausdorff_distance<Rhs>(&self, rhs: &Rhs) -> T
where Rhs: CoordsIter<Scalar = T>,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<'data, I> IntoParallelRefIterator<'data> for I
where I: 'data + ?Sized, &'data I: IntoParallelIterator,

Source§

type Iter = <&'data I as IntoParallelIterator>::Iter

The type of the parallel iterator that will be returned.
Source§

type Item = <&'data I as IntoParallelIterator>::Item

The type of item that the parallel iterator will produce. This will typically be an &'data T reference type.
Source§

fn par_iter(&'data self) -> <I as IntoParallelRefIterator<'data>>::Iter

Converts self into a parallel iterator. Read more
Source§

impl<'data, I> IntoParallelRefMutIterator<'data> for I

Source§

type Iter = <&'data mut I as IntoParallelIterator>::Iter

The type of iterator that will be created.
Source§

type Item = <&'data mut I as IntoParallelIterator>::Item

The type of item that will be produced; this is typically an &'data mut T reference.
Source§

fn par_iter_mut( &'data mut self, ) -> <I as IntoParallelRefMutIterator<'data>>::Iter

Creates the parallel iterator from self. Read more
Source§

impl<T, G> MinimumRotatedRect<T> for G
where T: CoordFloat + GeoFloat + GeoNum, G: CoordsIter<Scalar = T>,

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<G, IP, IR, T> Rotate<T> for G
where 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

Rotate a geometry around its centroid by an angle, in degrees Read more
Source§

fn rotate_around_centroid_mut(&mut self, degrees: T)

Mutable version of Self::rotate_around_centroid
Source§

fn rotate_around_center(&self, degrees: T) -> G

Rotate a geometry around the center of its bounding box by an angle, in degrees. Read more
Source§

fn rotate_around_center_mut(&mut self, degrees: T)

Mutable version of Self::rotate_around_center
Source§

fn rotate_around_point(&self, degrees: T, point: Point<T>) -> G

Rotate a Geometry around an arbitrary point by an angle, given in degrees Read more
Source§

fn rotate_around_point_mut(&mut self, degrees: T, point: Point<T>)

Mutable version of Self::rotate_around_point
Source§

impl<T, IR, G> Scale<T> for G
where T: CoordFloat, IR: Into<Option<Rect<T>>>, G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,

Source§

fn scale(&self, scale_factor: T) -> G

Scale a geometry from it’s bounding box center. Read more
Source§

fn scale_mut(&mut self, scale_factor: T)

Mutable version of scale
Source§

fn scale_xy(&self, x_factor: T, y_factor: T) -> G

Scale a geometry from it’s bounding box center, using different values for x_factor and y_factor to distort the geometry’s aspect ratio. Read more
Source§

fn scale_xy_mut(&mut self, x_factor: T, y_factor: T)

Mutable version of scale_xy.
Source§

fn scale_around_point( &self, x_factor: T, y_factor: T, origin: impl Into<Coord<T>>, ) -> G

Scale a geometry around a point of origin. Read more
Source§

fn scale_around_point_mut( &mut self, x_factor: T, y_factor: T, origin: impl Into<Coord<T>>, )

Mutable version of scale_around_point.
Source§

impl<T, IR, G> Skew<T> for G
where T: CoordFloat, IR: Into<Option<Rect<T>>>, G: Clone + AffineOps<T> + BoundingRect<T, Output = IR>,

Source§

fn skew(&self, degrees: T) -> G

An affine transformation which skews a geometry, sheared by a uniform angle along the x and y dimensions. Read more
Source§

fn skew_mut(&mut self, degrees: T)

Mutable version of skew.
Source§

fn skew_xy(&self, degrees_x: T, degrees_y: T) -> G

An affine transformation which skews a geometry, sheared by an angle along the x and y dimensions. Read more
Source§

fn skew_xy_mut(&mut self, degrees_x: T, degrees_y: T)

Mutable version of skew_xy.
Source§

fn skew_around_point(&self, xs: T, ys: T, origin: impl Into<Coord<T>>) -> G

An affine transformation which skews a geometry around a point of origin, sheared by an angle along the x and y dimensions. Read more
Source§

fn skew_around_point_mut(&mut self, xs: T, ys: T, origin: impl Into<Coord<T>>)

Mutable version of skew_around_point.
Source§

impl<T, G> ToDegrees<T> for G
where T: CoordFloat, G: MapCoords<T, T, Output = G> + MapCoordsInPlace<T>,

Source§

fn to_degrees(&self) -> Self

Source§

fn to_degrees_in_place(&mut self)

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, G> ToRadians<T> for G
where T: CoordFloat, G: MapCoords<T, T, Output = G> + MapCoordsInPlace<T>,

Source§

fn to_radians(&self) -> Self

Source§

fn to_radians_in_place(&mut self)

Source§

impl<T, G> Translate<T> for G
where T: CoordNum, G: AffineOps<T>,

Source§

fn translate(&self, x_offset: T, y_offset: T) -> G

Translate a Geometry along its axes by the given offsets Read more
Source§

fn translate_mut(&mut self, x_offset: T, y_offset: T)

Translate a Geometry along its axes, but in place.
Source§

impl<'a, T, G> TriangulateSpade<'a, T> for G
where T: SpadeTriangulationFloat, G: TriangulationRequirementTrait<'a, T>,

Source§

fn unconstrained_triangulation(&'a self) -> TriangulationResult<Triangles<T>>

returns a triangulation that’s solely based on the points of the geometric object Read more
Source§

fn constrained_outer_triangulation( &'a self, config: SpadeTriangulationConfig<T>, ) -> TriangulationResult<Triangles<T>>

returns triangulation that’s based on the points of the geometric object and also incorporates the lines of the input geometry Read more
Source§

fn constrained_triangulation( &'a self, config: SpadeTriangulationConfig<T>, ) -> TriangulationResult<Triangles<T>>

returns triangulation that’s based on the points of the geometric object and also incorporates the lines of the input geometry Read more
Source§

impl<G, T, U> TryConvert<T, U> for G
where T: CoordNum, U: CoordNum + TryFrom<T>, G: MapCoords<T, U>,

Source§

type Output = Result<<G as MapCoords<T, U>>::Output, <U as TryFrom<T>>::Error>

Source§

fn try_convert(&self) -> <G as TryConvert<T, U>>::Output

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

Source§

fn is_within(&self, b: &G2) -> bool