### Description

This tool creates simplified lines or polygons by removing vertices that contribute least to the overall shape of the feature. Specifically, this tool implements the Douglas-Peucker algorithm. There is often considerable redundancy in the definition of spatial features for a given application. Although this may not be an issue for many applications, some computationally intensive applications can achieve significant speed increases using simpler data. The idea here is that by simplifying the geometry of the shape, we facilitate faster analysis speeds while not sacrificing any important functional information contained in the geometry. I have been staggered at how effective this algorithm is at reducing the number of vertices while maintaining the overall shape of the feature.

The tolerance is the key parameter. High tolerances will result in greater simplification. It is worth testing a variety of tolerances to find the level that best suits your application. As a general rule of thumb, you might start by roughly estimating the average distance between vertices, and set your tolerance to be 10x greater than that. For instance, for features like lakes the distance between vertices might be roughly 5m in the UTM projection, and an initial tolerance of 50m is a reasonable starting point. However, the level of simplification that is acceptable depends very much on your application and it is absolutely essential to closely compare the original and simplified datasets to determine if the simplification could have a negative impact on your analysis.

Of particular concern are simplifications of polygons, especially polygons with holes or portions of which are long and thin (rivers, peninsulas, etc). The risk is that if the tolerance is too high then adjacent sides of the polygon will eventually overlap, fundamentally changing the overall shape of the geometry. This is why it is important to inspect the output of the tool closely and use this as the basis for judging an appropriate tolerance.

### Syntax

simplify(in, out, tol, [copyfields], [where]);

in | the input line or polygon feature data source | |

out | the output feature data source | |

tol | the tolerance distance that controls the degree of simplification (specified in coordinate system units) | |

[copyfields] | (TRUE/FALSE): if TRUE the fields in the input attribute table are copied to the output attribute table (default=FALSE) | |

[where] | the selection statement that will be applied to the feature data source to identify a subset of features to process (see full Help documentation for further details) |

### Example

simplify(in="C:\data\rivers.shp", out="C:\data\riverssimple.shp", tol=50, copyfields=TRUE);

simplify(in="C:\data\lakes.shp", out="C:\data\lakessimple.shp", tol=100, copyfields=FALSE, where="AREA > 1000");