You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If VertexReduction called with closed path an infinite recursion will result in RamerDouglasPeucker
I am not sure to understand the code but when I replace > with >= seems work
code in RamerDouglasPeucker
for Index := FirstIndex + 1 to LastIndex - 1 do
begin
with Points[LastIndex] do
Delta := Abs((Points[Index].x - x) * (Points[FirstIndex].y - y) -
(Points[Index].y - y) * (Points[FirstIndex].x - x));
if Delta >= DeltaMax then // instead of '>'
begin
DeltaMaxIndex := Index;
DeltaMax := Delta;
end;
end;
The text was updated successfully, but these errors were encountered:
The implementation of the Ramer-Douglas-Peucker algorithm appears to be correct although it is a bit strange that the float and fixed implementations uses different methods of calculating the point to line distance (and both seem to do it wrong: distance to line <= distance to line segment).
I don't have time to create a reproducible test case and I have not been able to spot the cause of any infinite recursions by looking at the code or running it in my head, so I'm afraid I'll have to defer this to @CWBudde who is the one that implemented this.
If VertexReduction called with closed path an infinite recursion will result in RamerDouglasPeucker
I am not sure to understand the code but when I replace > with >= seems work
code in RamerDouglasPeucker
The text was updated successfully, but these errors were encountered: