The Douglas Peucker Algorithm is a widely respected line simplification algorithm used in cartography, geoinformatics and spatial information science. During my lecture on geoinformatics, I created a minimal and simple implementation in python for students to understand the algorithm and to play with it. The implementation is based on Python and numpy in order to have a concise representation.

Find the code through the Lecture Page or directly here

In addition, I implemented a simple version of Bresenham Algorithm for Line Rasterization and Circle Rasterization and give hints on how to implement anti-aliasing (though extremely simplified).

Find the code through the Lecture Page or directly here

Finally, learning Well-Known Text and the relations induced by the DE-9IM (Dimesnioanlity-Enhanced Nine Intersection Model) is not always that easy. Therefore, I provide an implementation based on Shapely with which you can generate (or specify) examples and calculate all relevant relations and matrices using Python.

Find the code through the Lecture Page or directly here

If you like those implementations, let me know, for example on Twitter (@trajcomp).