Monday, 23 January 2012

Global line simplification algorithm POC

I created this line simplification algorithm as a proof-of-concept for a school exercise. The simplification is based on "Ramer–Douglas–Peucker algorithm" (Wikipedia entry), which is a global simplification algorithm. Code is written in Python, which doesn't support recursion too well. Python will throw you with an ugly "maximum recursion depth exceeded" error if the line consists of too many points and the tolerance value is too low.

I will only release the python source because the software doesn't really do anything interesting, but anyone interested can take a look. The file jGeom.py contains required classes and geomUI.py is the crude runnable UI-implementation. I you implement my code on your project, please credit me as the original author.

Download page



No comments: