Euclidean

Struct Euclidean 

Source
pub struct Euclidean;
Expand description

Operations on the Euclidean plane measure distance with the pythagorean formula - what you’d measure with a ruler.

If you have lon/lat points, use the Haversine, Geodesic, or other metric spaces - Euclidean methods will give nonsense results.

If you wish to use Euclidean operations with lon/lat, the coordinates must first be transformed using the Transform::transform / Transform::transform_crs_to_crs methods or their immutable variants. Use of these requires the proj feature

Trait Implementations§

Source§

impl<F: CoordFloat + FromPrimitive> Bearing<F> for Euclidean

Source§

fn bearing(&self, origin: Point<F>, destination: Point<F>) -> F

Returns the bearing from origin to destination in degrees along a straight line.

§Units
  • origin, destination: Points where x/y are cartesian coordinates
  • returns: degrees, measured clockwise from the positive Y-axis direction
    • 0° = positive Y direction (typically North)
    • 90° = positive X direction (typically East)
    • 180° = negative Y direction (typically South)
    • 270° = negative X direction (typically West)
§Examples
use geo::{Euclidean, Point, Bearing};

let origin = Point::new(0.0, 0.0);
let destination = Point::new(1.0, 1.0);
let bearing = Euclidean.bearing(origin, destination);
// NorthEast
assert_relative_eq!(bearing, 45.0, epsilon = 1.0e-2);
Source§

impl<F: CoordFloat + FromPrimitive> Destination<F> for Euclidean

Source§

fn destination(&self, origin: Point<F>, bearing: F, distance: F) -> Point<F>

Returns a new point having travelled the distance along a straight line from the origin point with the given bearing.

§Units
  • bearing: degrees, where: North: 0°, East: 90°, South: 180°, West: 270°
  • distance: meters
  • returns: Point where x/y are cartesian coordinates
§Examples
use geo::{Point, Destination, Euclidean};

// Determine the point 100 km NE of JFK airport.
let origin = Point::new(0.0, 0.0);
let northeast_bearing = 45.0;
let distance = 100.0;

let northeast_location = Euclidean.destination(origin, northeast_bearing, distance);
assert_relative_eq!(
    Point::new(70.71, 70.71),
    northeast_location,
    epsilon = 1.0e-2
);
Source§

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

Source§

fn distance(&self, origin: &Geometry<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Geometry<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Geometry<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Geometry<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Geometry<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Geometry<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Geometry<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Geometry<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Geometry<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Geometry<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, origin: &GeometryCollection<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, origin: &GeometryCollection<F>, destination: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &GeometryCollection<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &GeometryCollection<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &GeometryCollection<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &GeometryCollection<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &GeometryCollection<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &GeometryCollection<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &GeometryCollection<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &GeometryCollection<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &Line<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Line<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, line_a: &Line<F>, line_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, line: &Line<F>, line_string: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Line<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Line<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

impl<F> Distance<F, &Line<F>, &Point<F>> for Euclidean
where F: CoordFloat,

Source§

fn distance(&self, a: &Line<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, line: &Line<F>, polygon: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Line<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Line<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

impl<F> Distance<F, &Line<F>, Coord<F>> for Euclidean
where F: CoordFloat,

Source§

fn distance(&self, a: &Line<F>, b: Coord<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &LineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &LineString<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &LineString<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, line_string_a: &LineString<F>, line_string_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &LineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &LineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

impl<F> Distance<F, &LineString<F>, &Point<F>> for Euclidean
where F: CoordFloat,

Source§

fn distance(&self, a: &LineString<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, line_string: &LineString<F>, polygon: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &LineString<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &LineString<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &MultiLineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiLineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiLineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiLineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, origin: &MultiLineString<F>, destination: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &MultiLineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiLineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiLineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiLineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiLineString<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &MultiPoint<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiPoint<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, iter_geometry: &MultiPoint<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiPoint<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiPoint<F>, to_geometry: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &MultiPoint<F>, destination: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, iter_geometry: &MultiPoint<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, iter_geometry: &MultiPoint<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, iter_geometry: &MultiPoint<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, iter_geometry: &MultiPoint<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance( &self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &Point<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Point<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

impl<F: CoordFloat> Distance<F, &Point<F>, &Line<F>> for Euclidean

Source§

fn distance(&self, origin: &Point<F>, destination: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

impl<F: CoordFloat> Distance<F, &Point<F>, &LineString<F>> for Euclidean

Source§

fn distance(&self, origin: &Point<F>, destination: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Point<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Point<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

impl<F: CoordFloat> Distance<F, &Point<F>, &Point<F>> for Euclidean

Source§

fn distance(&self, origin: &Point<F>, destination: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, point: &Point<F>, polygon: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Point<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Point<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &Polygon<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Polygon<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Polygon<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Polygon<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Polygon<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Polygon<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Polygon<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, polygon_a: &Polygon<F>, polygon_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Polygon<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Polygon<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &Rect<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Rect<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, polygonlike: &Rect<F>, geometry_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, polygonlike: &Rect<F>, geometry_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Rect<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Rect<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, polygonlike: &Rect<F>, geometry_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, polygonlike: &Rect<F>, geometry_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &Rect<F>, destination: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Rect<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &Triangle<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Triangle<F>, b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Triangle<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, a: &Triangle<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, 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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, polygonlike: &Triangle<F>, geometry_b: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

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

Source§

fn distance(&self, origin: &Triangle<F>, destination: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

impl<F: CoordFloat> Distance<F, Coord<F>, &Line<F>> for Euclidean

Source§

fn distance(&self, coord: Coord<F>, line: &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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

impl<F: CoordFloat> Distance<F, Coord<F>, Coord<F>> for Euclidean

Source§

fn distance(&self, origin: Coord<F>, destination: Coord<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§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

impl<F: CoordFloat> Distance<F, Point<F>, Point<F>> for Euclidean

Calculate the Euclidean distance (a.k.a. pythagorean distance) between two Points

Source§

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

Calculate the Euclidean distance (a.k.a. pythagorean distance) between two Points

§Units
  • origin, destination: Point where the units of x/y represent non-angular units, e.g. meters or miles, not lon/lat. For lon/lat points, use the Haversine or Geodesic metric spaces.
  • returns: distance in the same units as the origin and destination points
§Example
use geo::{Euclidean, Distance};
use geo::Point;
// web mercator
let new_york_city = Point::new(-8238310.24, 4942194.78);
// web mercator
let london = Point::new(-14226.63, 6678077.70);
let distance: f64 = Euclidean.distance(new_york_city, london);

assert_eq!(
    8_405_286., // meters in web mercator
    distance.round()
);
Source§

fn distance_within( &self, origin: Origin, destination: Destination, distance: F, ) -> bool
where F: PartialOrd,

Returns true if the minimum distance between origin and destination is less than or equal to distance Read more
Source§

impl<F: CoordFloat + FromPrimitive> InterpolatePoint<F> for Euclidean

Interpolate Point(s) along a line on the Euclidean plane.

Source§

fn point_at_distance_between( &self, start: Point<F>, end: Point<F>, distance_from_start: F, ) -> Point<F>

Returns the point at the given distance along the line between start and end.

§Units
  • distance: Measured in whatever units your start and end points use.

    distance and your start and end points should have non-angular units, like meters or miles, not lon/lat. For lon/lat points, use the Haversine or Geodesic metric spaces.

Source§

fn point_at_ratio_between( &self, start: Point<F>, end: Point<F>, ratio_from_start: F, ) -> Point<F>

Returns the point at the given ratio along the line between start and end.

§Units
  • distance: Measured in whatever units your start and end points use.

    distance and your start and end points should have non-angular units, like meters or miles, not lon/lat. For lon/lat points, use the Haversine or Geodesic metric spaces.

Source§

fn points_along_line( &self, start: Point<F>, end: Point<F>, max_distance: F, include_ends: bool, ) -> impl Iterator<Item = Point<F>>

Interpolates Points along a line between start and end.

As many points as necessary will be added such that the distance between points never exceeds max_distance. If the distance between start and end is less than max_distance, no additional points will be included in the output.

include_ends: Should the start and end points be included in the output?

§Units
  • max_distance: Measured in whatever units your start and end points use.

    max_distance and your start and end points should have non-angular units, like meters or miles, not lon/lat. For lon/lat points, use the Haversine or Geodesic metric spaces.

Auto Trait Implementations§

Blanket Implementations§

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<F, MetricSpace> Densify<F> for MetricSpace
where F: CoordFloat, MetricSpace: Distance<F, Point<F>, Point<F>> + InterpolatePoint<F>,

Source§

fn densify<D>( &self, geometry: &D, max_segment_length: F, ) -> <D as Densifiable<F>>::Output
where D: Densifiable<F>,

Source§

impl<F, MetricSpace> FrechetDistance<F> for MetricSpace
where F: CoordFloat, MetricSpace: Distance<F, Point<F>, Point<F>>,

Source§

fn frechet_distance(&self, ls_1: &LineString<F>, ls_2: &LineString<F>) -> F

Returns the Fréchet distance between two LineStrings. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<F, MetricSpace> InterpolateLine<F> for MetricSpace
where F: CoordFloat, MetricSpace: InterpolatePoint<F> + Length<F>,

Source§

fn point_at_ratio_from_start<L: InterpolatableLine<F>>( &self, line: &L, ratio: F, ) -> L::Output

Returns a new point part way down the line. Read more
Source§

fn point_at_ratio_from_end<L: InterpolatableLine<F>>( &self, line: &L, ratio: F, ) -> L::Output

Returns a new point part way down the line, starting from the end of the line. Read more
Source§

fn point_at_distance_from_start<L: InterpolatableLine<F>>( &self, line: &L, distance: F, ) -> L::Output

Returns a new point distance from the start of the line. Read more
Source§

fn point_at_distance_from_end<L: InterpolatableLine<F>>( &self, line: &L, distance: F, ) -> L::Output

Returns a new point distance from the end of the line. Read more
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<F, PointDistance> Length<F> for PointDistance
where F: CoordFloat, PointDistance: Distance<F, Point<F>, Point<F>>,

Source§

fn length(&self, geometry: &impl LengthMeasurable<F>) -> F

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<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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

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

Source§

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