geo::algorithm::chaikin_smoothing

Trait ChaikinSmoothing

Source
pub trait ChaikinSmoothing<T>{
    // 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.

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§