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
sourceimpl<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());
sourceimpl<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
sourceimpl<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,
sourcefn 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);
type Epsilon = T
type Epsilon = T
Used for specifying relative comparisons.
sourcefn default_epsilon(
) -> <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon
fn default_epsilon(
) -> <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon
The default tolerance to use when testing values that are close together. Read more
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of [AbsDiffEq::abs_diff_eq
].
sourceimpl<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
sourceimpl<T> BoundingRect<T> for MultiLineString<T> where
T: CoordNum,
impl<T> BoundingRect<T> for MultiLineString<T> where
T: CoordNum,
sourceimpl<T> Centroid for MultiLineString<T> where
T: GeoFloat,
impl<T> Centroid for MultiLineString<T> where
T: GeoFloat,
sourceimpl<T> ChaikinSmoothing<T> for MultiLineString<T> where
T: CoordFloat + FromPrimitive,
impl<T> ChaikinSmoothing<T> for MultiLineString<T> where
T: CoordFloat + FromPrimitive,
sourcefn chaikin_smoothing(&self, n_iterations: usize) -> Self
fn chaikin_smoothing(&self, n_iterations: usize) -> Self
create a new geometry with the Chaikin smoothing being
applied n_iterations
times. Read more
sourceimpl<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
sourceimpl<T> Clone for MultiLineString<T> where
T: Clone + CoordNum,
impl<T> Clone for MultiLineString<T> where
T: Clone + CoordNum,
sourcefn clone(&self) -> MultiLineString<T>
fn clone(&self) -> MultiLineString<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<F: GeoFloat> ClosestPoint<F, Point<F>> for MultiLineString<F>
impl<F: GeoFloat> ClosestPoint<F, Point<F>> for MultiLineString<F>
sourcefn closest_point(&self, p: &Point<F>) -> Closest<F>
fn closest_point(&self, p: &Point<F>) -> Closest<F>
Find the closest point between self
and p
.
sourceimpl<T> ConcaveHull for MultiLineString<T> where
T: GeoFloat + RTreeNum,
impl<T> ConcaveHull for MultiLineString<T> where
T: GeoFloat + RTreeNum,
type Scalar = T
fn concave_hull(&self, concavity: T) -> Polygon<T>
sourceimpl<G, T> Contains<G> for MultiLineString<T> where
T: CoordNum,
LineString<T>: Contains<G>,
impl<G, T> Contains<G> for MultiLineString<T> where
T: CoordNum,
LineString<T>: Contains<G>,
sourceimpl<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
sourceimpl<T> ConvexHull for MultiLineString<T> where
T: GeoNum,
impl<T> ConvexHull for MultiLineString<T> where
T: GeoNum,
type Scalar = T
fn convex_hull(&self) -> Polygon<T>
sourceimpl<T> CoordinatePosition for MultiLineString<T> where
T: GeoNum,
impl<T> CoordinatePosition for MultiLineString<T> where
T: GeoNum,
type Scalar = T
fn calculate_coordinate_position(
&self,
coord: &Coordinate<T>,
is_inside: &mut bool,
boundary_count: &mut usize
)
fn coordinate_position(&self, coord: &Coordinate<Self::Scalar>) -> CoordPos
sourceimpl<'a, T: CoordNum + 'a> CoordsIter<'a> for MultiLineString<T>
impl<'a, T: CoordNum + 'a> CoordsIter<'a> for MultiLineString<T>
sourcefn 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
sourcefn coords_iter(&'a self) -> Self::Iter
fn coords_iter(&'a self) -> Self::Iter
Iterate over all exterior and (if any) interior coordinates of a geometry. Read more
sourcefn exterior_coords_iter(&'a self) -> Self::ExteriorIter
fn exterior_coords_iter(&'a self) -> Self::ExteriorIter
Iterate over all exterior coordinates of a geometry. Read more
sourceimpl<T> Debug for MultiLineString<T> where
T: Debug + CoordNum,
impl<T> Debug for MultiLineString<T> where
T: Debug + CoordNum,
sourceimpl<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>,
type Output = MultiLineString<T>
fn densify(&self, max_distance: T) -> Self::Output
sourceimpl<T> EuclideanDistance<T, MultiLineString<T>> for Point<T> where
T: GeoFloat,
impl<T> EuclideanDistance<T, MultiLineString<T>> for Point<T> where
T: GeoFloat,
sourcefn euclidean_distance(&self, mls: &MultiLineString<T>) -> T
fn euclidean_distance(&self, mls: &MultiLineString<T>) -> T
Minimum distance from a Point to a MultiLineString
sourceimpl<T> EuclideanDistance<T, Point<T>> for MultiLineString<T> where
T: GeoFloat,
impl<T> EuclideanDistance<T, Point<T>> for MultiLineString<T> where
T: GeoFloat,
sourcefn euclidean_distance(&self, point: &Point<T>) -> T
fn euclidean_distance(&self, point: &Point<T>) -> T
Minimum distance from a MultiLineString to a Point
sourceimpl<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,
sourcefn euclidean_length(&self) -> T
fn euclidean_length(&self) -> T
Calculation of the length of a Line Read more
sourceimpl<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>>,
sourcefn from(ls: ILS) -> MultiLineString<T>
fn from(ls: ILS) -> MultiLineString<T>
Converts to this type from the input type.
sourceimpl<T> From<MultiLineString<T>> for Geometry<T> where
T: CoordNum,
impl<T> From<MultiLineString<T>> for Geometry<T> where
T: CoordNum,
sourcefn from(x: MultiLineString<T>) -> Geometry<T>
fn from(x: MultiLineString<T>) -> Geometry<T>
Converts to this type from the input type.
sourceimpl<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>>,
sourcefn 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>,
Creates a value from an iterator. Read more
sourceimpl GeodesicLength<f64, MultiLineString<f64>> for MultiLineString
impl GeodesicLength<f64, MultiLineString<f64>> for MultiLineString
sourcefn geodesic_length(&self) -> f64
fn geodesic_length(&self) -> f64
Determine the length of a geometry on an ellipsoidal model of the earth. Read more
sourceimpl<C: CoordNum> HasDimensions for MultiLineString<C>
impl<C: CoordNum> HasDimensions for MultiLineString<C>
sourcefn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Some geometries, like a MultiPoint
, can have zero coordinates - we call these empty
. Read more
sourcefn dimensions(&self) -> Dimensions
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 Rect
s are 2-dimensional, but it’s possible to create degenerate Rect
s which
have either 1 or 0 dimensions. Read more
sourcefn boundary_dimensions(&self) -> Dimensions
fn boundary_dimensions(&self) -> Dimensions
The dimensions of the Geometry
’s boundary, as used by OGC-SFA. Read more
sourceimpl<T> Hash for MultiLineString<T> where
T: Hash + CoordNum,
impl<T> Hash for MultiLineString<T> where
T: Hash + CoordNum,
sourceimpl<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,
sourcefn haversine_length(&self) -> T
fn haversine_length(&self) -> T
Determine the length of a geometry using the haversine formula. Read more
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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>
The type of the elements being iterated over.
type IntoIter = IntoIter<LineString<T>, Global>
type IntoIter = IntoIter<LineString<T>, Global>
Which kind of iterator are we turning this into?
sourcefn into_iter(self) -> <MultiLineString<T> as IntoIterator>::IntoIter
fn into_iter(self) -> <MultiLineString<T> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
sourceimpl<'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>
The type of the elements being iterated over.
type IntoIter = IterMut<'a, LineString<T>>
type IntoIter = IterMut<'a, LineString<T>>
Which kind of iterator are we turning this into?
sourcefn into_iter(self) -> <&'a mut MultiLineString<T> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a mut MultiLineString<T> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
sourceimpl<'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>
The type of the elements being iterated over.
type IntoIter = Iter<'a, LineString<T>>
type IntoIter = Iter<'a, LineString<T>>
Which kind of iterator are we turning this into?
sourcefn into_iter(self) -> <&'a MultiLineString<T> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a MultiLineString<T> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
sourceimpl<'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>>>
sourcefn lines_iter(&'a self) -> Self::Iter
fn lines_iter(&'a self) -> Self::Iter
Iterate over all exterior and (if any) interior lines of a geometry. Read more
sourceimpl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for MultiLineString<T>
impl<T: CoordNum, NT: CoordNum> MapCoords<T, NT> for MultiLineString<T>
type Output = MultiLineString<NT>
sourcefn map_coords(
&self,
func: impl Fn(Coordinate<T>) -> Coordinate<NT> + Copy
) -> Self::Output
fn map_coords(
&self,
func: impl Fn(Coordinate<T>) -> Coordinate<NT> + Copy
) -> Self::Output
Apply a function to all the coordinates in a geometric object, returning a new object. Read more
sourcefn try_map_coords<E>(
&self,
func: impl Fn(Coordinate<T>) -> Result<Coordinate<NT>, E> + Copy
) -> Result<Self::Output, E>
fn try_map_coords<E>(
&self,
func: impl Fn(Coordinate<T>) -> Result<Coordinate<NT>, E> + Copy
) -> Result<Self::Output, E>
Map a fallible function over all the coordinates in a geometry, returning a Result Read more
sourceimpl<T: CoordNum> MapCoordsInPlace<T> for MultiLineString<T>
impl<T: CoordNum> MapCoordsInPlace<T> for MultiLineString<T>
sourcefn map_coords_in_place(
&mut self,
func: impl Fn(Coordinate<T>) -> Coordinate<T> + Copy
)
fn map_coords_in_place(
&mut self,
func: impl Fn(Coordinate<T>) -> Coordinate<T> + Copy
)
Apply a function to all the coordinates in a geometric object, in place Read more
sourcefn try_map_coords_in_place<E>(
&mut self,
func: impl Fn(Coordinate<T>) -> Result<Coordinate<T>, E>
) -> Result<(), E>
fn try_map_coords_in_place<E>(
&mut self,
func: impl Fn(Coordinate<T>) -> Result<Coordinate<T>, E>
) -> Result<(), E>
Map a fallible function over all the coordinates in a geometry, in place, returning a Result
. Read more
sourceimpl<T: CoordNum> MapCoordsInplace<T> for MultiLineString<T>
impl<T: CoordNum> MapCoordsInplace<T> for MultiLineString<T>
sourcefn map_coords_inplace(&mut self, func: impl Fn((T, T)) -> (T, T) + Copy) where
T: CoordNum,
👎 Deprecated since 0.21.0: use MapCoordsInPlace::map_coords_in_place
instead which takes a Coordinate
instead of an (x,y) tuple
fn map_coords_inplace(&mut self, func: impl Fn((T, T)) -> (T, T) + Copy) where
T: CoordNum,
use MapCoordsInPlace::map_coords_in_place
instead which takes a Coordinate
instead of an (x,y) tuple
Apply a function to all the coordinates in a geometric object, in place
Examples
#[allow(deprecated)]
use geo::MapCoordsInplace;
use geo::Point;
use approx::assert_relative_eq;
let mut p = Point::new(10., 20.);
#[allow(deprecated)]
p.map_coords_inplace(|(x, y)| (x + 1000., y * 2.));
assert_relative_eq!(p, Point::new(1010., 40.), epsilon = 1e-6);
sourceimpl<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,
sourcefn eq(&self, other: &MultiLineString<T>) -> bool
fn eq(&self, other: &MultiLineString<T>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MultiLineString<T>) -> bool
fn ne(&self, other: &MultiLineString<T>) -> bool
This method tests for !=
.
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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
sourceimpl<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>,
sourcefn 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);
sourcefn default_max_relative(
) -> <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon
fn default_max_relative(
) -> <MultiLineString<T> as AbsDiffEq<MultiLineString<T>>>::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
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
The inverse of [RelativeEq::relative_eq
].
sourceimpl<T> Rotate<T> for MultiLineString<T> where
T: GeoFloat,
impl<T> Rotate<T> for MultiLineString<T> where
T: GeoFloat,
sourcefn rotate_around_centroid(&self, angle: T) -> Self
fn rotate_around_centroid(&self, angle: T) -> Self
Rotate the contained LineStrings about the centroid by the given number of degrees
sourcefn rotate_around_center(&self, angle: T) -> Self
fn rotate_around_center(&self, angle: T) -> Self
Rotate the contained LineStrings about center of the bounding rectangle by the given number of degrees
sourcefn rotate(&self, angle: T) -> Self
👎 Deprecated: Equivalent to rotate_around_centroid
except for Polygon<T>
,
where it is equivalent to rotating around the polygon’s outer ring.
Call that instead, or rotate_around_center
if you’d like to rotate
around the geometry’s bounding box center.
fn rotate(&self, angle: T) -> Self
Equivalent to rotate_around_centroid
except for Polygon<T>
,
where it is equivalent to rotating around the polygon’s outer ring.
Call that instead, or rotate_around_center
if you’d like to rotate
around the geometry’s bounding box center.
Rotate the contained LineStrings about their centroid by the given number of degrees
sourceimpl<T> Simplify<T, T> for MultiLineString<T> where
T: GeoFloat,
impl<T> Simplify<T, T> for MultiLineString<T> where
T: GeoFloat,
sourcefn simplify(&self, epsilon: &T) -> Self
fn simplify(&self, epsilon: &T) -> Self
Returns the simplified representation of a geometry, using the Ramer–Douglas–Peucker algorithm Read more
sourceimpl<T> SimplifyVW<T, T> for MultiLineString<T> where
T: CoordFloat,
impl<T> SimplifyVW<T, T> for MultiLineString<T> where
T: CoordFloat,
sourcefn simplifyvw(&self, epsilon: &T) -> MultiLineString<T>
fn simplifyvw(&self, epsilon: &T) -> MultiLineString<T>
Returns the simplified representation of a geometry, using the Visvalingam-Whyatt algorithm Read more
sourceimpl<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,
sourcefn simplifyvw_preserve(&self, epsilon: &T) -> MultiLineString<T>
fn simplifyvw_preserve(&self, epsilon: &T) -> MultiLineString<T>
Returns the simplified representation of a geometry, using a topology-preserving variant of the Visvalingam-Whyatt algorithm. Read more
sourceimpl<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.
sourceimpl<T: CoordNum, NT: CoordNum, E> TryMapCoords<T, NT, E> for MultiLineString<T>
impl<T: CoordNum, NT: CoordNum, E> TryMapCoords<T, NT, E> for MultiLineString<T>
type Output = MultiLineString<NT>
type Output = MultiLineString<NT>
use MapCoords::try_map_coords
which takes a Coordinate
instead of an (x,y) tuple
sourcefn try_map_coords(
&self,
func: impl Fn((T, T)) -> Result<(NT, NT), E> + Copy
) -> Result<Self::Output, E>
fn try_map_coords(
&self,
func: impl Fn((T, T)) -> Result<(NT, NT), E> + Copy
) -> Result<Self::Output, E>
use MapCoords::try_map_coords
which takes a Coordinate
instead of an (x,y) tuple
Map a fallible function over all the coordinates in a geometry, returning a Result Read more
sourceimpl<T: CoordNum, E> TryMapCoordsInplace<T, E> for MultiLineString<T>
impl<T: CoordNum, E> TryMapCoordsInplace<T, E> for MultiLineString<T>
sourcefn try_map_coords_inplace(
&mut self,
func: impl Fn((T, T)) -> Result<(T, T), E>
) -> Result<(), E>
fn try_map_coords_inplace(
&mut self,
func: impl Fn((T, T)) -> Result<(T, T), E>
) -> Result<(), E>
use MapCoordsInPlace::try_map_coords_in_place
which takes a Coordinate
instead of an (x,y) tuple
Map a fallible function over all the coordinates in a geometry, in place, returning a Result
. Read more
sourceimpl<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,
sourcefn vincenty_length(&self) -> Result<T, FailedToConvergeError>
fn vincenty_length(&self) -> Result<T, FailedToConvergeError>
Determine the length of a geometry using Vincenty’s formulae. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<G, T, U> Convert<T, U> for G where
T: CoordNum,
U: CoordNum + From<T>,
G: MapCoords<T, U>,
impl<G, T, U> Convert<T, U> for G where
T: CoordNum,
U: CoordNum + From<T>,
G: MapCoords<T, U>,
sourceimpl<'a, T, G> Extremes<'a, T> for G where
G: CoordsIter<'a, Scalar = T>,
T: CoordNum,
impl<'a, T, G> Extremes<'a, T> for G where
G: CoordsIter<'a, Scalar = T>,
T: CoordNum,
sourceimpl<T, G> RotatePoint<T> for G where
T: CoordFloat,
G: MapCoords<T, T, Output = G>,
impl<T, G> RotatePoint<T> for G where
T: CoordFloat,
G: MapCoords<T, T, Output = G>,
sourcefn rotate_around_point(&self, angle: T, point: Point<T>) -> G
fn rotate_around_point(&self, angle: T, point: Point<T>) -> G
Rotate a Geometry around an arbitrary point by an angle, given in degrees Read more
sourceimpl<T, G> Translate<T> for G where
T: CoordNum,
G: MapCoords<T, T, Output = G> + MapCoordsInPlace<T>,
impl<T, G> Translate<T> for G where
T: CoordNum,
G: MapCoords<T, T, Output = G> + MapCoordsInPlace<T>,
sourcefn translate(&self, xoff: T, yoff: T) -> G
fn translate(&self, xoff: T, yoff: T) -> G
Translate a Geometry along its axes by the given offsets Read more
sourcefn translate_in_place(&mut self, xoff: T, yoff: T)
fn translate_in_place(&mut self, xoff: T, yoff: T)
Translate a Geometry along its axes, but in place.
sourcefn translate_inplace(&mut self, xoff: T, yoff: T)
fn translate_inplace(&mut self, xoff: T, yoff: T)
renamed to translate_in_place
Translate a Geometry along its axes, but in place.