Code / Ideas on how to simplify polygons?

Jul 5, 2013 at 3:33 PM
I have an external app that can only accept a limited number of polygon vertices.
My goal is to take a typical US county of 3000 coordinates and reduce it down to 20 or so.

I think I need to consider both the line length - ie throw away the shortest lines
and possibly the line angle - throw away lines that are only slightly offset from the last line.

Any suggestions on how to do this?


Jul 5, 2013 at 7:51 PM
Look in the Topology.Simplify namespace. There are a few simplifiers to choose from. I have used the Douglas Peucker simplifier which is a well-known one.
Jul 10, 2013 at 5:39 PM
Thanks - I had no idea this was already there!
Is there any documentation on how the algorithm works etc?

Jul 11, 2013 at 12:47 PM
I'm not aware of any DotSpatial documentation. But, if you search for the Douglas Peucker algorithm on the internet, you should be able to find some.