geo::algorithm::line_measures

Trait Distance

Source
pub trait Distance<F, Origin, Destination> {
    // Required method
    fn distance(origin: Origin, destination: Destination) -> F;
}
Expand description

Calculate the minimum distance between two geometries.

Required Methods§

Source

fn distance(origin: Origin, destination: Destination) -> F

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

§Units
  • origin, destination: geometry where the units of x/y depend on the trait implementation.
  • returns: depends on the trait implementation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Distance<f64, Point, Point> for Geodesic

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<F: CoordFloat + FromPrimitive> Distance<F, Point<F>, Point<F>> for Haversine

Source§

impl<F: CoordFloat + FromPrimitive> Distance<F, Point<F>, Point<F>> for Rhumb

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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