[−][src]Trait geo::algorithm::intersects::Intersects
Checks if the geometry Self intersects the geometry Rhs.
More formally, either boundary or interior of Self has
non-empty (set-theoretic) intersection with the boundary
or interior of Rhs. In other words, the DE-9IM
intersection matrix for (Self, Rhs) is not FF*FF****
.
This predicate is symmetric: a.intersects(b)
iff
b.intersects(a)
.
Examples
use geo::algorithm::intersects::Intersects; use geo::line_string; let line_string_a = line_string![ (x: 3., y: 2.), (x: 7., y: 6.), ]; let line_string_b = line_string![ (x: 3., y: 4.), (x: 8., y: 4.), ]; let line_string_c = line_string![ (x: 9., y: 2.), (x: 11., y: 5.), ]; assert!(line_string_a.intersects(&line_string_b)); assert!(!line_string_a.intersects(&line_string_c));
Required methods
fn intersects(&self, rhs: &Rhs) -> bool
Implementors
impl<G, T> Intersects<G> for MultiPolygon<T> where
T: HasKernel,
Polygon<T>: Intersects<G>,
[src]
T: HasKernel,
Polygon<T>: Intersects<G>,
fn intersects(&self, rhs: &G) -> bool
[src]
impl<T> Intersects<Geometry<T>> for Coordinate<T> where
Geometry<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
[src]
Geometry<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Geometry<T>) -> bool
[src]
impl<T> Intersects<Geometry<T>> for Line<T> where
Geometry<T>: Intersects<Line<T>>,
T: CoordinateType,
[src]
Geometry<T>: Intersects<Line<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Geometry<T>) -> bool
[src]
impl<T> Intersects<Geometry<T>> for Polygon<T> where
Geometry<T>: Intersects<Polygon<T>>,
T: CoordinateType,
[src]
Geometry<T>: Intersects<Polygon<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Geometry<T>) -> bool
[src]
impl<T> Intersects<Geometry<T>> for Rect<T> where
Geometry<T>: Intersects<Rect<T>>,
T: CoordinateType,
[src]
Geometry<T>: Intersects<Rect<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Geometry<T>) -> bool
[src]
impl<T> Intersects<Coordinate<T>> for Coordinate<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn intersects(&self, rhs: &Coordinate<T>) -> bool
[src]
impl<T> Intersects<Coordinate<T>> for Line<T> where
T: HasKernel,
[src]
T: HasKernel,
fn intersects(&self, rhs: &Coordinate<T>) -> bool
[src]
impl<T> Intersects<Coordinate<T>> for Polygon<T> where
T: HasKernel,
[src]
T: HasKernel,
fn intersects(&self, p: &Coordinate<T>) -> bool
[src]
impl<T> Intersects<Coordinate<T>> for Rect<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn intersects(&self, rhs: &Coordinate<T>) -> bool
[src]
impl<T> Intersects<GeometryCollection<T>> for Coordinate<T> where
GeometryCollection<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
[src]
GeometryCollection<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &GeometryCollection<T>) -> bool
[src]
impl<T> Intersects<GeometryCollection<T>> for Line<T> where
GeometryCollection<T>: Intersects<Line<T>>,
T: CoordinateType,
[src]
GeometryCollection<T>: Intersects<Line<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &GeometryCollection<T>) -> bool
[src]
impl<T> Intersects<GeometryCollection<T>> for Polygon<T> where
GeometryCollection<T>: Intersects<Polygon<T>>,
T: CoordinateType,
[src]
GeometryCollection<T>: Intersects<Polygon<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &GeometryCollection<T>) -> bool
[src]
impl<T> Intersects<GeometryCollection<T>> for Rect<T> where
GeometryCollection<T>: Intersects<Rect<T>>,
T: CoordinateType,
[src]
GeometryCollection<T>: Intersects<Rect<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &GeometryCollection<T>) -> bool
[src]
impl<T> Intersects<Line<T>> for Coordinate<T> where
Line<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
[src]
Line<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Line<T>) -> bool
[src]
impl<T> Intersects<Line<T>> for Line<T> where
T: HasKernel,
[src]
T: HasKernel,
fn intersects(&self, line: &Line<T>) -> bool
[src]
impl<T> Intersects<Line<T>> for Polygon<T> where
T: HasKernel,
[src]
T: HasKernel,
fn intersects(&self, line: &Line<T>) -> bool
[src]
impl<T> Intersects<Line<T>> for Rect<T> where
T: HasKernel,
[src]
T: HasKernel,
fn intersects(&self, rhs: &Line<T>) -> bool
[src]
impl<T> Intersects<LineString<T>> for Coordinate<T> where
LineString<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
[src]
LineString<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &LineString<T>) -> bool
[src]
impl<T> Intersects<LineString<T>> for Line<T> where
LineString<T>: Intersects<Line<T>>,
T: CoordinateType,
[src]
LineString<T>: Intersects<Line<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &LineString<T>) -> bool
[src]
impl<T> Intersects<LineString<T>> for Polygon<T> where
LineString<T>: Intersects<Polygon<T>>,
T: CoordinateType,
[src]
LineString<T>: Intersects<Polygon<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &LineString<T>) -> bool
[src]
impl<T> Intersects<MultiLineString<T>> for Polygon<T> where
MultiLineString<T>: Intersects<Polygon<T>>,
T: CoordinateType,
[src]
MultiLineString<T>: Intersects<Polygon<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &MultiLineString<T>) -> bool
[src]
impl<T> Intersects<MultiPoint<T>> for Coordinate<T> where
MultiPoint<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
[src]
MultiPoint<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &MultiPoint<T>) -> bool
[src]
impl<T> Intersects<MultiPoint<T>> for Line<T> where
MultiPoint<T>: Intersects<Line<T>>,
T: CoordinateType,
[src]
MultiPoint<T>: Intersects<Line<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &MultiPoint<T>) -> bool
[src]
impl<T> Intersects<MultiPoint<T>> for Polygon<T> where
MultiPoint<T>: Intersects<Polygon<T>>,
T: CoordinateType,
[src]
MultiPoint<T>: Intersects<Polygon<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &MultiPoint<T>) -> bool
[src]
impl<T> Intersects<MultiPoint<T>> for Rect<T> where
MultiPoint<T>: Intersects<Rect<T>>,
T: CoordinateType,
[src]
MultiPoint<T>: Intersects<Rect<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &MultiPoint<T>) -> bool
[src]
impl<T> Intersects<MultiPolygon<T>> for Line<T> where
MultiPolygon<T>: Intersects<Line<T>>,
T: CoordinateType,
[src]
MultiPolygon<T>: Intersects<Line<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &MultiPolygon<T>) -> bool
[src]
impl<T> Intersects<MultiPolygon<T>> for Point<T> where
MultiPolygon<T>: Intersects<Point<T>>,
T: CoordinateType,
[src]
MultiPolygon<T>: Intersects<Point<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &MultiPolygon<T>) -> bool
[src]
impl<T> Intersects<MultiPolygon<T>> for Polygon<T> where
MultiPolygon<T>: Intersects<Polygon<T>>,
T: CoordinateType,
[src]
MultiPolygon<T>: Intersects<Polygon<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &MultiPolygon<T>) -> bool
[src]
impl<T> Intersects<MultiPolygon<T>> for Rect<T> where
MultiPolygon<T>: Intersects<Rect<T>>,
T: CoordinateType,
[src]
MultiPolygon<T>: Intersects<Rect<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &MultiPolygon<T>) -> bool
[src]
impl<T> Intersects<Point<T>> for Coordinate<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn intersects(&self, rhs: &Point<T>) -> bool
[src]
impl<T> Intersects<Point<T>> for Line<T> where
Point<T>: Intersects<Line<T>>,
T: CoordinateType,
[src]
Point<T>: Intersects<Line<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Point<T>) -> bool
[src]
impl<T> Intersects<Point<T>> for Polygon<T> where
Point<T>: Intersects<Polygon<T>>,
T: CoordinateType,
[src]
Point<T>: Intersects<Polygon<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Point<T>) -> bool
[src]
impl<T> Intersects<Point<T>> for Rect<T> where
Point<T>: Intersects<Rect<T>>,
T: CoordinateType,
[src]
Point<T>: Intersects<Rect<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Point<T>) -> bool
[src]
impl<T> Intersects<Polygon<T>> for Coordinate<T> where
Polygon<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
[src]
Polygon<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Polygon<T>) -> bool
[src]
impl<T> Intersects<Polygon<T>> for Line<T> where
Polygon<T>: Intersects<Line<T>>,
T: CoordinateType,
[src]
Polygon<T>: Intersects<Line<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Polygon<T>) -> bool
[src]
impl<T> Intersects<Polygon<T>> for Polygon<T> where
T: HasKernel,
[src]
T: HasKernel,
fn intersects(&self, polygon: &Polygon<T>) -> bool
[src]
impl<T> Intersects<Polygon<T>> for Rect<T> where
Polygon<T>: Intersects<Rect<T>>,
T: CoordinateType,
[src]
Polygon<T>: Intersects<Rect<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Polygon<T>) -> bool
[src]
impl<T> Intersects<Rect<T>> for Coordinate<T> where
Rect<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
[src]
Rect<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Rect<T>) -> bool
[src]
impl<T> Intersects<Rect<T>> for Line<T> where
Rect<T>: Intersects<Line<T>>,
T: CoordinateType,
[src]
Rect<T>: Intersects<Line<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Rect<T>) -> bool
[src]
impl<T> Intersects<Rect<T>> for Polygon<T> where
T: HasKernel,
[src]
T: HasKernel,
fn intersects(&self, rect: &Rect<T>) -> bool
[src]
impl<T> Intersects<Rect<T>> for Rect<T> where
T: CoordinateType,
[src]
T: CoordinateType,
fn intersects(&self, other: &Rect<T>) -> bool
[src]
impl<T> Intersects<Triangle<T>> for Coordinate<T> where
Triangle<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
[src]
Triangle<T>: Intersects<Coordinate<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Triangle<T>) -> bool
[src]
impl<T> Intersects<Triangle<T>> for Line<T> where
Triangle<T>: Intersects<Line<T>>,
T: CoordinateType,
[src]
Triangle<T>: Intersects<Line<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Triangle<T>) -> bool
[src]
impl<T> Intersects<Triangle<T>> for Polygon<T> where
Triangle<T>: Intersects<Polygon<T>>,
T: CoordinateType,
[src]
Triangle<T>: Intersects<Polygon<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Triangle<T>) -> bool
[src]
impl<T> Intersects<Triangle<T>> for Rect<T> where
Triangle<T>: Intersects<Rect<T>>,
T: CoordinateType,
[src]
Triangle<T>: Intersects<Rect<T>>,
T: CoordinateType,
fn intersects(&self, rhs: &Triangle<T>) -> bool
[src]
impl<T, G> Intersects<G> for Geometry<T> where
T: CoordinateType,
Point<T>: Intersects<G>,
MultiPoint<T>: Intersects<G>,
Line<T>: Intersects<G>,
LineString<T>: Intersects<G>,
MultiLineString<T>: Intersects<G>,
Triangle<T>: Intersects<G>,
Rect<T>: Intersects<G>,
Polygon<T>: Intersects<G>,
MultiPolygon<T>: Intersects<G>,
[src]
T: CoordinateType,
Point<T>: Intersects<G>,
MultiPoint<T>: Intersects<G>,
Line<T>: Intersects<G>,
LineString<T>: Intersects<G>,
MultiLineString<T>: Intersects<G>,
Triangle<T>: Intersects<G>,
Rect<T>: Intersects<G>,
Polygon<T>: Intersects<G>,
MultiPolygon<T>: Intersects<G>,
fn intersects(&self, rhs: &G) -> bool
[src]
impl<T, G> Intersects<G> for GeometryCollection<T> where
T: CoordinateType,
Geometry<T>: Intersects<G>,
[src]
T: CoordinateType,
Geometry<T>: Intersects<G>,
fn intersects(&self, rhs: &G) -> bool
[src]
impl<T, G> Intersects<G> for LineString<T> where
T: CoordinateType,
Line<T>: Intersects<G>,
[src]
T: CoordinateType,
Line<T>: Intersects<G>,
fn intersects(&self, geom: &G) -> bool
[src]
impl<T, G> Intersects<G> for MultiLineString<T> where
T: CoordinateType,
LineString<T>: Intersects<G>,
[src]
T: CoordinateType,
LineString<T>: Intersects<G>,
fn intersects(&self, rhs: &G) -> bool
[src]
impl<T, G> Intersects<G> for MultiPoint<T> where
T: CoordinateType,
Point<T>: Intersects<G>,
[src]
T: CoordinateType,
Point<T>: Intersects<G>,
fn intersects(&self, rhs: &G) -> bool
[src]
impl<T, G> Intersects<G> for Point<T> where
T: CoordinateType,
Coordinate<T>: Intersects<G>,
[src]
T: CoordinateType,
Coordinate<T>: Intersects<G>,
fn intersects(&self, rhs: &G) -> bool
[src]
impl<T, G> Intersects<G> for Triangle<T> where
T: CoordinateType,
Polygon<T>: Intersects<G>,
[src]
T: CoordinateType,
Polygon<T>: Intersects<G>,