Trait geo::algorithm::chaikin_smoothing::ChaikinSmoothing
source · pub trait ChaikinSmoothing<T>where
T: CoordFloat + FromPrimitive,{
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.