Simplifies the given poly (polyline or polygon) using the Douglas-Peucker decimation algorithm. Increasing the tolerance will result in fewer points in the simplified polyline or polygon.
When the providing a polygon as input, the first and last point of the list MUST have the same latitude and longitude (i.e., the polygon must be closed). If the input polygon is not closed, the resulting polygon may not be fully simplified.
The time complexity of Douglas-Peucker is O(n^2), so take care that you do not call this algorithm too frequently in your code.
tolerance - Double: in meters. Increasing the tolerance will result in fewer points in the simplified poly.