Struct geo::geometry::MultiLineString
source · pub struct MultiLineString<T = f64>(pub Vec<LineString<T>, Global>)
where
T: CoordNum;
Expand description
A collection of
LineString
s. Can
be created from a Vec
of LineString
s or from an
Iterator which yields LineString
s. Iterating over this
object yields the component LineString
s.
Semantics
The boundary of a MultiLineString
is obtained by
applying the “mod 2” union rule: A Point
is in the
boundary of a MultiLineString
if it is in the
boundaries of an odd number of elements of the
MultiLineString
.
The interior of a MultiLineString
is the union of
the interior, and boundary of the constituent
LineString
s, except for the boundary as defined
above. In other words, it is the set difference of the
boundary from the union of the interior and boundary of
the constituents.
A MultiLineString
is simple if and only if all of
its elements are simple and the only intersections
between any two elements occur at Point
s that are on
the boundaries of both elements. A MultiLineString
is
closed if all of its elements are closed. The boundary
of a closed MultiLineString
is always empty.
Tuple Fields§
§0: Vec<LineString<T>, Global>
Implementations§
source§impl<T> MultiLineString<T>where
T: CoordNum,
impl<T> MultiLineString<T>where T: CoordNum,
sourcepub fn new(value: Vec<LineString<T>, Global>) -> MultiLineString<T>
pub fn new(value: Vec<LineString<T>, Global>) -> MultiLineString<T>
Instantiate Self from the raw content value
sourcepub fn is_closed(&self) -> bool
pub fn is_closed(&self) -> bool
True if the MultiLineString is empty or if all of its LineStrings are closed - see
LineString::is_closed
.
Examples
use geo_types::{MultiLineString, LineString, line_string};
let open_line_string: LineString<f32> = line_string![(x: 0., y: 0.), (x: 5., y: 0.)];
assert!(!MultiLineString::new(vec![open_line_string.clone()]).is_closed());
let closed_line_string: LineString<f32> = line_string![(x: 0., y: 0.), (x: 5., y: 0.), (x: 0., y: 0.)];
assert!(MultiLineString::new(vec![closed_line_string.clone()]).is_closed());
// MultiLineString is not closed if *any* of it's LineStrings are not closed
assert!(!MultiLineString::new(vec![open_line_string, closed_line_string]).is_closed());
// An empty MultiLineString is closed
assert!(MultiLineString::<f32>::new(vec![]).is_closed());
source§impl<T> MultiLineString<T>where
T: CoordNum,
impl<T> MultiLineString<T>where T: CoordNum,
pub fn iter(&self) -> impl Iterator<Item = &LineString<T>>
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut LineString<T>>
Trait Implementations§
source§impl<T> AbsDiffEq<MultiLineString<T>> for MultiLineString<T>where
T: AbsDiffEq<T, Epsilon = T> + CoordNum,
<T as AbsDiffEq<T>>::Epsilon: Copy,
impl<T> AbsDiffEq<MultiLineString<T>> for MultiLineString<T>where T: AbsDiffEq<T, Epsilon = T> + CoordNum, <T as AbsDiffEq<T>>::Epsilon: Copy,
source§fn abs_diff_eq(
&self,
other: &MultiLineString<T>,
epsilon: <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon
) -> bool
fn abs_diff_eq( &self, other: &MultiLineString<T>, epsilon: <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon ) -> bool
Equality assertion with an absolute limit.
Examples
use geo_types::{MultiLineString, line_string};
let a = MultiLineString::new(vec![line_string![(x: 0., y: 0.), (x: 10., y: 10.)]]);
let b = MultiLineString::new(vec![line_string![(x: 0., y: 0.), (x: 10.01, y: 10.)]]);
approx::abs_diff_eq!(a, b, epsilon=0.1);
approx::abs_diff_ne!(a, b, epsilon=0.001);
source§fn default_epsilon(
) -> <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon
fn default_epsilon( ) -> <MultiLineString<T> as AbsDiffEq<MultiLineString<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 MultiLineString<T>where
T: CoordNum,
impl<T> Area<T> for MultiLineString<T>where T: CoordNum,
fn signed_area(&self) -> T
fn unsigned_area(&self) -> T
source§impl<T> BoundingRect<T> for MultiLineString<T>where
T: CoordNum,
impl<T> BoundingRect<T> for MultiLineString<T>where T: CoordNum,
source§impl<T> Centroid for MultiLineString<T>where
T: GeoFloat,
impl<T> Centroid for MultiLineString<T>where T: GeoFloat,
source§fn centroid(&self) -> Self::Output
fn centroid(&self) -> Self::Output
The Centroid of a MultiLineString
is the mean of the centroids of all the constituent linestrings,
weighted by the length of each linestring
Examples
use geo::Centroid;
use geo::{MultiLineString, line_string, point};
let multi_line_string = MultiLineString::new(vec![
// centroid: (2.5, 2.5)
line_string![(x: 1.0f32, y: 1.0), (x: 2.0, y: 2.0), (x: 4.0, y: 4.0)],
// centroid: (4.0, 4.0)
line_string![(x: 1.0, y: 1.0), (x: 3.0, y: 3.0), (x: 7.0, y: 7.0)],
]);
assert_eq!(
// ( 3.0 * (2.5, 2.5) + 6.0 * (4.0, 4.0) ) / 9.0
Some(point!(x: 3.5, y: 3.5)),
multi_line_string.centroid(),
);
type Output = Option<Point<T>>
source§impl<T> ChaikinSmoothing<T> for MultiLineString<T>where
T: CoordFloat + FromPrimitive,
impl<T> ChaikinSmoothing<T> for MultiLineString<T>where T: CoordFloat + FromPrimitive,
source§fn chaikin_smoothing(&self, n_iterations: usize) -> Self
fn chaikin_smoothing(&self, n_iterations: usize) -> Self
n_iterations
times.source§impl<T> ChamberlainDuquetteArea<T> for MultiLineString<T>where
T: CoordFloat,
impl<T> ChamberlainDuquetteArea<T> for MultiLineString<T>where T: CoordFloat,
fn chamberlain_duquette_signed_area(&self) -> T
fn chamberlain_duquette_unsigned_area(&self) -> T
source§impl<T> Clone for MultiLineString<T>where
T: Clone + CoordNum,
impl<T> Clone for MultiLineString<T>where T: Clone + CoordNum,
source§fn clone(&self) -> MultiLineString<T>
fn clone(&self) -> MultiLineString<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 MultiLineString<F>
impl<F: GeoFloat> ClosestPoint<F, Point<F>> for MultiLineString<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<T> ConcaveHull for MultiLineString<T>where
T: GeoFloat + RTreeNum,
impl<T> ConcaveHull for MultiLineString<T>where T: GeoFloat + RTreeNum,
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<LineString<T>> for MultiLineString<T>where
T: GeoFloat,
impl<T> Contains<LineString<T>> for MultiLineString<T>where T: GeoFloat,
fn contains(&self, target: &LineString<T>) -> bool
source§impl<F> Contains<MultiLineString<F>> for MultiPolygon<F>where
F: GeoFloat,
impl<F> Contains<MultiLineString<F>> for MultiPolygon<F>where F: GeoFloat,
fn contains(&self, rhs: &MultiLineString<F>) -> bool
source§impl<T> Contains<MultiLineString<T>> for Geometry<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for Geometry<T>where T: GeoFloat,
fn contains(&self, multi_line_string: &MultiLineString<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<MultiLineString<T>> for Line<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for Line<T>where T: GeoFloat,
fn contains(&self, target: &MultiLineString<T>) -> bool
source§impl<T> Contains<MultiLineString<T>> for LineString<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for LineString<T>where T: GeoFloat,
fn contains(&self, target: &MultiLineString<T>) -> bool
source§impl<T> Contains<MultiLineString<T>> for MultiLineString<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for MultiLineString<T>where T: GeoFloat,
fn contains(&self, target: &MultiLineString<T>) -> bool
source§impl<T> Contains<MultiLineString<T>> for MultiPoint<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for MultiPoint<T>where T: GeoFloat,
fn contains(&self, target: &MultiLineString<T>) -> bool
source§impl<T> Contains<MultiLineString<T>> for Point<T>where
T: CoordNum,
impl<T> Contains<MultiLineString<T>> for Point<T>where T: CoordNum,
fn contains(&self, multi_line_string: &MultiLineString<T>) -> bool
source§impl<T> Contains<MultiLineString<T>> for Polygon<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for Polygon<T>where T: GeoFloat,
fn contains(&self, target: &MultiLineString<T>) -> bool
source§impl<T> Contains<MultiLineString<T>> for Rect<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for Rect<T>where T: GeoFloat,
fn contains(&self, target: &MultiLineString<T>) -> bool
source§impl<T> Contains<MultiLineString<T>> for Triangle<T>where
T: GeoFloat,
impl<T> Contains<MultiLineString<T>> for Triangle<T>where T: GeoFloat,
fn contains(&self, target: &MultiLineString<T>) -> bool
source§impl<T> Contains<MultiPoint<T>> for MultiLineString<T>where
T: GeoFloat,
impl<T> Contains<MultiPoint<T>> for MultiLineString<T>where T: GeoFloat,
fn contains(&self, target: &MultiPoint<T>) -> bool
source§impl<T> Contains<MultiPolygon<T>> for MultiLineString<T>where
T: GeoFloat,
impl<T> Contains<MultiPolygon<T>> for MultiLineString<T>where T: GeoFloat,
fn contains(&self, target: &MultiPolygon<T>) -> bool
source§impl<T> Contains<Point<T>> for MultiLineString<T>where
T: CoordNum,
LineString<T>: Contains<Point<T>>,
impl<T> Contains<Point<T>> for MultiLineString<T>where T: CoordNum, LineString<T>: Contains<Point<T>>,
source§impl<T> CoordinatePosition for MultiLineString<T>where
T: GeoNum,
impl<T> CoordinatePosition for MultiLineString<T>where T: GeoNum,
source§impl<'a, T: CoordNum + 'a> CoordsIter<'a> for MultiLineString<T>
impl<'a, T: CoordNum + 'a> CoordsIter<'a> for MultiLineString<T>
source§fn coords_count(&'a self) -> usize
fn coords_count(&'a self) -> usize
Return the number of coordinates in the MultiLineString
.
type Iter = Flatten<MapCoordsIter<'a, T, Iter<'a, LineString<T>>, LineString<T>>>
type ExteriorIter = <MultiLineString<T> as CoordsIter<'a>>::Iter
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> Densify<T> for MultiLineString<T>where
T: CoordFloat,
Line<T>: EuclideanLength<T>,
LineString<T>: EuclideanLength<T>,
impl<T> Densify<T> for MultiLineString<T>where T: CoordFloat, Line<T>: EuclideanLength<T>, LineString<T>: EuclideanLength<T>,
source§impl<'de, T> Deserialize<'de> for MultiLineString<T>where
T: CoordNum + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for MultiLineString<T>where T: CoordNum + Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<MultiLineString<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<MultiLineString<T>, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
source§impl<T> EuclideanDistance<T, MultiLineString<T>> for Point<T>where
T: GeoFloat,
impl<T> EuclideanDistance<T, MultiLineString<T>> for Point<T>where T: GeoFloat,
source§fn euclidean_distance(&self, mls: &MultiLineString<T>) -> T
fn euclidean_distance(&self, mls: &MultiLineString<T>) -> T
Minimum distance from a Point to a MultiLineString
source§impl<T> EuclideanDistance<T, Point<T>> for MultiLineString<T>where
T: GeoFloat,
impl<T> EuclideanDistance<T, Point<T>> for MultiLineString<T>where T: GeoFloat,
source§fn euclidean_distance(&self, point: &Point<T>) -> T
fn euclidean_distance(&self, point: &Point<T>) -> T
Minimum distance from a MultiLineString to a Point
source§impl<T> EuclideanLength<T, MultiLineString<T>> for MultiLineString<T>where
T: CoordFloat + Sum,
impl<T> EuclideanLength<T, MultiLineString<T>> for MultiLineString<T>where T: CoordFloat + Sum,
source§fn euclidean_length(&self) -> T
fn euclidean_length(&self) -> T
source§impl<T, ILS> From<ILS> for MultiLineString<T>where
T: CoordNum,
ILS: Into<LineString<T>>,
impl<T, ILS> From<ILS> for MultiLineString<T>where T: CoordNum, ILS: Into<LineString<T>>,
source§fn from(ls: ILS) -> MultiLineString<T>
fn from(ls: ILS) -> MultiLineString<T>
source§impl<T> From<MultiLineString<T>> for Geometry<T>where
T: CoordNum,
impl<T> From<MultiLineString<T>> for Geometry<T>where T: CoordNum,
source§fn from(x: MultiLineString<T>) -> Geometry<T>
fn from(x: MultiLineString<T>) -> Geometry<T>
source§impl<T, ILS> FromIterator<ILS> for MultiLineString<T>where
T: CoordNum,
ILS: Into<LineString<T>>,
impl<T, ILS> FromIterator<ILS> for MultiLineString<T>where T: CoordNum, ILS: Into<LineString<T>>,
source§fn from_iter<I>(iter: I) -> MultiLineString<T>where
I: IntoIterator<Item = ILS>,
fn from_iter<I>(iter: I) -> MultiLineString<T>where I: IntoIterator<Item = ILS>,
source§impl GeodesicArea<f64> for MultiLineString
impl GeodesicArea<f64> for MultiLineString
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 GeodesicLength<f64, MultiLineString<f64>> for MultiLineString
impl GeodesicLength<f64, MultiLineString<f64>> for MultiLineString
source§fn geodesic_length(&self) -> f64
fn geodesic_length(&self) -> f64
source§impl<C: CoordNum> HasDimensions for MultiLineString<C>
impl<C: CoordNum> HasDimensions for MultiLineString<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> HaversineLength<T, MultiLineString<T>> for MultiLineString<T>where
T: CoordFloat + FromPrimitive,
impl<T> HaversineLength<T, MultiLineString<T>> for MultiLineString<T>where T: CoordFloat + FromPrimitive,
source§fn haversine_length(&self) -> T
fn haversine_length(&self) -> T
source§impl<T> InteriorPoint for MultiLineString<T>where
T: GeoFloat,
impl<T> InteriorPoint for MultiLineString<T>where T: GeoFloat,
source§impl<T, G> Intersects<G> for MultiLineString<T>where
T: CoordNum,
LineString<T>: Intersects<G>,
G: BoundingRect<T>,
impl<T, G> Intersects<G> for MultiLineString<T>where T: CoordNum, LineString<T>: Intersects<G>, G: BoundingRect<T>,
fn intersects(&self, rhs: &G) -> bool
source§impl<T> Intersects<MultiLineString<T>> for Line<T>where
MultiLineString<T>: Intersects<Line<T>>,
T: CoordNum,
impl<T> Intersects<MultiLineString<T>> for Line<T>where MultiLineString<T>: Intersects<Line<T>>, T: CoordNum,
fn intersects(&self, rhs: &MultiLineString<T>) -> bool
source§impl<T> Intersects<MultiLineString<T>> for Point<T>where
MultiLineString<T>: Intersects<Point<T>>,
T: CoordNum,
impl<T> Intersects<MultiLineString<T>> for Point<T>where MultiLineString<T>: Intersects<Point<T>>, T: CoordNum,
fn intersects(&self, rhs: &MultiLineString<T>) -> bool
source§impl<T> Intersects<MultiLineString<T>> for Polygon<T>where
MultiLineString<T>: Intersects<Polygon<T>>,
T: CoordNum,
impl<T> Intersects<MultiLineString<T>> for Polygon<T>where MultiLineString<T>: Intersects<Polygon<T>>, T: CoordNum,
fn intersects(&self, rhs: &MultiLineString<T>) -> bool
source§impl<T> Intersects<MultiLineString<T>> for Rect<T>where
MultiLineString<T>: Intersects<Rect<T>>,
T: CoordNum,
impl<T> Intersects<MultiLineString<T>> for Rect<T>where MultiLineString<T>: Intersects<Rect<T>>, T: CoordNum,
fn intersects(&self, rhs: &MultiLineString<T>) -> bool
source§impl<'a, T> IntoIterator for &'a MultiLineString<T>where
T: CoordNum,
impl<'a, T> IntoIterator for &'a MultiLineString<T>where T: CoordNum,
§type Item = &'a LineString<T>
type Item = &'a LineString<T>
§type IntoIter = Iter<'a, LineString<T>>
type IntoIter = Iter<'a, LineString<T>>
source§fn into_iter(self) -> <&'a MultiLineString<T> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a MultiLineString<T> as IntoIterator>::IntoIter
source§impl<'a, T> IntoIterator for &'a mut MultiLineString<T>where
T: CoordNum,
impl<'a, T> IntoIterator for &'a mut MultiLineString<T>where T: CoordNum,
§type Item = &'a mut LineString<T>
type Item = &'a mut LineString<T>
§type IntoIter = IterMut<'a, LineString<T>>
type IntoIter = IterMut<'a, LineString<T>>
source§fn into_iter(self) -> <&'a mut MultiLineString<T> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a mut MultiLineString<T> as IntoIterator>::IntoIter
source§impl<T> IntoIterator for MultiLineString<T>where
T: CoordNum,
impl<T> IntoIterator for MultiLineString<T>where T: CoordNum,
§type Item = LineString<T>
type Item = LineString<T>
§type IntoIter = IntoIter<LineString<T>, Global>
type IntoIter = IntoIter<LineString<T>, Global>
source§fn into_iter(self) -> <MultiLineString<T> as IntoIterator>::IntoIter
fn into_iter(self) -> <MultiLineString<T> as IntoIterator>::IntoIter
source§impl<'a, T: CoordNum + 'a> LinesIter<'a> for MultiLineString<T>
impl<'a, T: CoordNum + 'a> LinesIter<'a> for MultiLineString<T>
type Scalar = T
type Iter = Flatten<MapLinesIter<'a, Iter<'a, LineString<<MultiLineString<T> as LinesIter<'a>>::Scalar>>, LineString<<MultiLineString<T> as LinesIter<'a>>::Scalar>>>
source§fn lines_iter(&'a self) -> Self::Iter
fn lines_iter(&'a self) -> Self::Iter
source§impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for MultiLineString<T>
impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for MultiLineString<T>
source§impl<T: CoordNum> MapCoordsInPlace<T> for MultiLineString<T>
impl<T: CoordNum> MapCoordsInPlace<T> for MultiLineString<T>
source§impl<T> PartialEq<MultiLineString<T>> for MultiLineString<T>where
T: PartialEq<T> + CoordNum,
impl<T> PartialEq<MultiLineString<T>> for MultiLineString<T>where T: PartialEq<T> + CoordNum,
source§fn eq(&self, other: &MultiLineString<T>) -> bool
fn eq(&self, other: &MultiLineString<T>) -> bool
self
and other
values to be equal, and is used
by ==
.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, Line<F>> for MultiLineString<F>
impl<F: GeoFloat> Relate<F, Line<F>> for MultiLineString<F>
fn relate(&self, other: &Line<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, LineString<F>> for MultiLineString<F>
impl<F: GeoFloat> Relate<F, LineString<F>> for MultiLineString<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, MultiLineString<F>> for Line<F>
impl<F: GeoFloat> Relate<F, MultiLineString<F>> for Line<F>
fn relate(&self, other: &MultiLineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiLineString<F>> for LineString<F>
impl<F: GeoFloat> Relate<F, MultiLineString<F>> for LineString<F>
fn relate(&self, other: &MultiLineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiLineString<F>> for MultiLineString<F>
impl<F: GeoFloat> Relate<F, MultiLineString<F>> for MultiLineString<F>
fn relate(&self, other: &MultiLineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiLineString<F>> for MultiPoint<F>
impl<F: GeoFloat> Relate<F, MultiLineString<F>> for MultiPoint<F>
fn relate(&self, other: &MultiLineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiLineString<F>> for MultiPolygon<F>
impl<F: GeoFloat> Relate<F, MultiLineString<F>> for MultiPolygon<F>
fn relate(&self, other: &MultiLineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiLineString<F>> for Point<F>
impl<F: GeoFloat> Relate<F, MultiLineString<F>> for Point<F>
fn relate(&self, other: &MultiLineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiLineString<F>> for Polygon<F>
impl<F: GeoFloat> Relate<F, MultiLineString<F>> for Polygon<F>
fn relate(&self, other: &MultiLineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiLineString<F>> for Rect<F>
impl<F: GeoFloat> Relate<F, MultiLineString<F>> for Rect<F>
fn relate(&self, other: &MultiLineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiLineString<F>> for Triangle<F>
impl<F: GeoFloat> Relate<F, MultiLineString<F>> for Triangle<F>
fn relate(&self, other: &MultiLineString<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiPoint<F>> for MultiLineString<F>
impl<F: GeoFloat> Relate<F, MultiPoint<F>> for MultiLineString<F>
fn relate(&self, other: &MultiPoint<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, MultiPolygon<F>> for MultiLineString<F>
impl<F: GeoFloat> Relate<F, MultiPolygon<F>> for MultiLineString<F>
fn relate(&self, other: &MultiPolygon<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, Point<F>> for MultiLineString<F>
impl<F: GeoFloat> Relate<F, Point<F>> for MultiLineString<F>
fn relate(&self, other: &Point<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, Polygon<F>> for MultiLineString<F>
impl<F: GeoFloat> Relate<F, Polygon<F>> for MultiLineString<F>
fn relate(&self, other: &Polygon<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, Rect<F>> for MultiLineString<F>
impl<F: GeoFloat> Relate<F, Rect<F>> for MultiLineString<F>
fn relate(&self, other: &Rect<F>) -> IntersectionMatrix
source§impl<F: GeoFloat> Relate<F, Triangle<F>> for MultiLineString<F>
impl<F: GeoFloat> Relate<F, Triangle<F>> for MultiLineString<F>
fn relate(&self, other: &Triangle<F>) -> IntersectionMatrix
source§impl<T> RelativeEq<MultiLineString<T>> for MultiLineString<T>where
T: AbsDiffEq<T, Epsilon = T> + CoordNum + RelativeEq<T>,
impl<T> RelativeEq<MultiLineString<T>> for MultiLineString<T>where T: AbsDiffEq<T, Epsilon = T> + CoordNum + RelativeEq<T>,
source§fn relative_eq(
&self,
other: &MultiLineString<T>,
epsilon: <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon,
max_relative: <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon
) -> bool
fn relative_eq( &self, other: &MultiLineString<T>, epsilon: <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon, max_relative: <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon ) -> bool
Equality assertion within a relative limit.
Examples
use geo_types::{MultiLineString, line_string};
let a = MultiLineString::new(vec![line_string![(x: 0., y: 0.), (x: 10., y: 10.)]]);
let b = MultiLineString::new(vec![line_string![(x: 0., y: 0.), (x: 10.01, y: 10.)]]);
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(
) -> <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon
fn default_max_relative( ) -> <MultiLineString<T> as AbsDiffEq<MultiLineString<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 MultiLineString<T>where
T: CoordNum + FromPrimitive,
impl<T> RemoveRepeatedPoints<T> for MultiLineString<T>where T: CoordNum + FromPrimitive,
source§fn remove_repeated_points(&self) -> Self
fn remove_repeated_points(&self) -> Self
Create a MultiLineString with consecutive repeated points removed.
source§fn remove_repeated_points_mut(&mut self)
fn remove_repeated_points_mut(&mut self)
Remove consecutive repeated points from a MultiLineString inplace.
source§impl<T> Serialize for MultiLineString<T>where
T: CoordNum + Serialize,
impl<T> Serialize for MultiLineString<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,
source§impl<T> Simplify<T, T> for MultiLineString<T>where
T: GeoFloat,
impl<T> Simplify<T, T> for MultiLineString<T>where T: GeoFloat,
source§impl<T> SimplifyVw<T, T> for MultiLineString<T>where
T: CoordFloat,
impl<T> SimplifyVw<T, T> for MultiLineString<T>where T: CoordFloat,
source§fn simplify_vw(&self, epsilon: &T) -> MultiLineString<T>
fn simplify_vw(&self, epsilon: &T) -> MultiLineString<T>
source§impl<T> SimplifyVwPreserve<T, T> for MultiLineString<T>where
T: CoordFloat + RTreeNum + HasKernel,
impl<T> SimplifyVwPreserve<T, T> for MultiLineString<T>where T: CoordFloat + RTreeNum + HasKernel,
source§fn simplify_vw_preserve(&self, epsilon: &T) -> MultiLineString<T>
fn simplify_vw_preserve(&self, epsilon: &T) -> MultiLineString<T>
source§impl<T> TryFrom<Geometry<T>> for MultiLineString<T>where
T: CoordNum,
impl<T> TryFrom<Geometry<T>> for MultiLineString<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§impl<T> VincentyLength<T, MultiLineString<T>> for MultiLineString<T>where
T: CoordFloat + FromPrimitive,
impl<T> VincentyLength<T, MultiLineString<T>> for MultiLineString<T>where T: CoordFloat + FromPrimitive,
source§fn vincenty_length(&self) -> Result<T, FailedToConvergeError>
fn vincenty_length(&self) -> Result<T, FailedToConvergeError>
impl<T> Eq for MultiLineString<T>where T: Eq + CoordNum,
impl<T> StructuralEq for MultiLineString<T>where T: CoordNum,
impl<T> StructuralPartialEq for MultiLineString<T>where T: CoordNum,
Auto Trait Implementations§
impl<T> RefUnwindSafe for MultiLineString<T>where T: RefUnwindSafe,
impl<T> Send for MultiLineString<T>where T: Send,
impl<T> Sync for MultiLineString<T>where T: Sync,
impl<T> Unpin for MultiLineString<T>where T: Unpin,
impl<T> UnwindSafe for MultiLineString<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
.