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.

Chaikins smoothing 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§

source

fn chaikin_smoothing(&self, n_iterations: usize) -> Self

create a new geometry with the Chaikin smoothing being applied n_iterations times.

Implementors§