pub trait ChaikinSmoothing<T>where
T: CoordFloat + FromPrimitive,{
// Required method
fn chaikin_smoothing(&self, n_iterations: usize) -> Self;
}
Expand description
Smoothen LineString
, Polygon
, MultiLineString
and MultiPolygon
using Chaikins algorithm.
Each iteration of the smoothing doubles the number of vertices of the geometry, so in some cases it may make sense to apply a simplification afterwards to remove insignificant coordinates.
This implementation preserves the start and end vertices of an open linestring and smoothes the corner between start and end of a closed linestring.
Required Methods§
Sourcefn chaikin_smoothing(&self, n_iterations: usize) -> Self
fn chaikin_smoothing(&self, n_iterations: usize) -> Self
create a new geometry with the Chaikin smoothing being
applied n_iterations
times.
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.