ESRI’s Generalize function / MS SQL Server 2008’s Reduce function
We were trying to load some watershed polygon data into VirtualEarth but the number of vertices on those polygons was large enough to affect the performance of the map. Since, the data was being used to pull up documents for each watershed and not for getting accurate map data, we decided to generalize or reduce the vertices on the watershed polygons by an acceptable distance factor and limit the scale on the map to not let the user view the data at low scales. We knew that ESRI’s Generalize(…) function on IPath did exactly that and takes a tolerance. It does so using the “Douglas-Peucker algorithm“, although ESRI’s documentation calls it “Douglas-Poiker algorithm”. But when I was tooling around MS SQL Server 2008, I found the Reduce(…) function in it does the same. This made me curious to see if Microsoft and ESRI’s versions of the algorithm performed the same. And they do… Both of the functions reduced the number of vertices on one of watersheds polygon from 14245 to 450 when using a tolerance of 30 meters.