-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attempt to better document Simplify traits epsilon
parameter
#1151
Conversation
The triangle explanation (which is correct!) only applies to the Visvalingam-Whyatt algorithm. The RDP algorithm (which underlies Simplify) is distance-based… |
Thank you! Please take another look @urschrei |
@@ -192,7 +198,13 @@ pub trait Simplify<T, Epsilon = T> { | |||
/// This operation uses the [Ramer–Douglas–Peucker algorithm](https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm) | |||
/// and does not guarantee that the returned geometry is valid. | |||
/// | |||
/// An epsilon less than or equal to zero will return an unaltered version of the geometry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A related question is can we alter our algorithm such that epsilon == 0
will remove collinear points, but nothing else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe with distance and area calculations it's not feasible to have epsilon == 0
from a robustness perspective...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I don't know that either algorithm can be made to work precisely like that. I can have a look at "the literature".
CHANGES.md
if knowledge of this change could be valuable to users.I'm actually not sure if this is what the parameter really means, but it's my best guess at this point. Is anyone more familiar willing to clarify?