Hi,
The algorithm works pretty fast and accurate. Kudo to you!
One problem I see with all implementations of RDP (or RDP itself) is it does not handle the initial two end points well.
For example:
import numpy as np
from simplification.cutil import simplify_coords
a = np.array([[0,1], [0,0], [2,0], [2,2], [0,2]])
b = simplify_coords(a)
This would result in b equals a, which is not what I expected. I would expect to have b consists of only 4 vertices. I understand that the theory behind RDP doesn't cover this case but I honestly can't think of a good solution for this other than checking for cases like this manually.
Any better ideas?
Hi, The algorithm works pretty fast and accurate. Kudo to you! One problem I see with all implementations of RDP (or RDP itself) is it does not handle the initial two end points well. For example:
This would result in b equals a, which is not what I expected. I would expect to have b consists of only 4 vertices. I understand that the theory behind RDP doesn't cover this case but I honestly can't think of a good solution for this other than checking for cases like this manually. Any better ideas?