pub struct CartesianLinestringCentroid;Expand description
Cartesian centroid for a geometry_trait::Linestring — length-weighted midpoint of
each segment, summed and divided by total length.
Mirrors the linear_tag arm of
boost/geometry/algorithms/centroid.hpp together with
strategies/cartesian/centroid_average.hpp, which averages segment
midpoints weighted by segment length.
Trait Implementations§
Source§impl<G> CentroidStrategy<G> for CartesianLinestringCentroidwhere
G: LinestringTrait,
G::Point: PointTrait + PointMut + Default + Copy,
<<G::Point as PointTrait>::Cs as CoordinateSystem>::Family: SameAs<CartesianFamily>,
Pythagoras: DistanceStrategy<G::Point, G::Point, Out = <G::Point as PointTrait>::Scalar>,
impl<G> CentroidStrategy<G> for CartesianLinestringCentroidwhere
G: LinestringTrait,
G::Point: PointTrait + PointMut + Default + Copy,
<<G::Point as PointTrait>::Cs as CoordinateSystem>::Family: SameAs<CartesianFamily>,
Pythagoras: DistanceStrategy<G::Point, G::Point, Out = <G::Point as PointTrait>::Scalar>,
Source§impl Clone for CartesianLinestringCentroid
impl Clone for CartesianLinestringCentroid
Source§fn clone(&self) -> CartesianLinestringCentroid
fn clone(&self) -> CartesianLinestringCentroid
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CartesianLinestringCentroid
Source§impl Debug for CartesianLinestringCentroid
impl Debug for CartesianLinestringCentroid
Source§impl Default for CartesianLinestringCentroid
impl Default for CartesianLinestringCentroid
Source§fn default() -> CartesianLinestringCentroid
fn default() -> CartesianLinestringCentroid
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CartesianLinestringCentroid
impl RefUnwindSafe for CartesianLinestringCentroid
impl Send for CartesianLinestringCentroid
impl Sync for CartesianLinestringCentroid
impl Unpin for CartesianLinestringCentroid
impl UnsafeUnpin for CartesianLinestringCentroid
impl UnwindSafe for CartesianLinestringCentroid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more