Skip to content

Commit

Permalink
expand documation about simplifying polygons w.r.t. validity & topology
Browse files Browse the repository at this point in the history
  • Loading branch information
Rory McCann committed Aug 9, 2017
1 parent ea61f74 commit c6769d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/algorithm/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn rdp<T>(points: &[Point<T>], epsilon: &T) -> Vec<Point<T>>
/// The [Ramer–Douglas–Peucker
/// algorithm](https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm) simplifes a
/// linestring. Polygons are simplified by running the RDP algorithm on all their constituant
/// rings.
/// rings. This may result in invalid Polygons, and has no guarantee of perserving topology.
///
/// Multi* objects are simplified by simplifing all their constituant geometries individually.
pub trait Simplify<T, Epsilon = T> {
Expand Down
5 changes: 3 additions & 2 deletions src/algorithm/simplifyvw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ fn area<T>(p1: &Point<T>, p2: &Point<T>, p3: &Point<T>) -> T

/// Simplifies a geometry.
///
/// Polygons are simplified by running the algorithm on all their constituant rings. Multi* objects
/// are simplified by simplifing all their constituant geometries individually.
/// Polygons are simplified by running the algorithm on all their constituant rings. This may
/// result in invalid Polygons, and has no guarantee of perserving topology. Multi* objects are
/// simplified by simplifing all their constituant geometries individually.
pub trait SimplifyVW<T, Epsilon = T> {
/// Returns the simplified representation of a geometry, using the [Visvalingam-Whyatt](http://www.tandfonline.com/doi/abs/10.1179/000870493786962263) algorithm
///
Expand Down

0 comments on commit c6769d0

Please sign in to comment.