I\'m searching for algorithms to reduce the LOD of polylines, lines (looped or not) of nodes. In simple words, I want to take hi-resolution coastline data and be able to re
In regards to culebron's answer, is the recursive call correct? From what I understand, RDP breaks up a a line into two different lines: start to max, and max to end.
But looking at the call, where pos is the index of the max dist in the list...
return (ramerdouglas(line[:pos + 2], dist) +
ramerdouglas(line[pos + 1:], dist)[1:])
is instead doing start to max+1, max+1 to end. Shouldn't it be...
return (ramerdouglas(line[:pos + 1], dist) +
ramerdouglas(line[pos:], dist)[1:])