Reduce number of points in line
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 reduce its LOD hundred- or thousandfold to render it in small-scale. I found polygon reduction algorithms (but they require triangles) and Laplacian smoothing, but that doesn't seem exactly what I need. dbr I've modified the code in culebrón's answer , removing the need for the Vec2D/Line classes, instead handling the points as a list of tuples. The code is slightly less tidy, but shorter, and a bit quicker (for 900 points, the