Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
noticed you declared
nr
but then didn't use it.also, another suggestion (not included here):
instead of the iterative version of
.decimate.core
used here, why not just sequence along the edge? this approach is faster in my benchmarks for small levels of precision (it's more or less stable w.r.t. precision, whereas.decimate.core
had marked increases in computation time for precision <.1. further, it is very consistent in speed across precision levels.it is slower than the
.decimate.core
version for moderately large levels of precision (relative to the initial distance), which is why I wanted to ping you before including it.here's what I came up with this morning:
this may be able to be sped up. the idea is to divide the line between the pair of points into just enough equal-length segments to make the proximal distances below
pr
.let me know what you think