Shows the usage of the utility method "simplifyLineString" that implements the Douglas-Peucker algorithm to remove "insignificant" vertices from LineString geometries.
The method OpenLayers.Util.simplifyLineString can be used to simplify linestring geometries. Simplification sometimes is useful to enhance the perfomance of vector rendering or to reduce complexity of geometries. This might be especially handy when viewing geometries a small scales.
OpenLayers.Util.simplifyLineString is a recursive implementation of the famous Douglas-Peucker algorithm. It is controlled by a tolerance factor that defines the threshold for vertices to be considered "insignificant" for the general structure of the geometry.
The LineString on the left map can be simplified according to the tolerance value one enters in the form-field above the maps. Use a value between 0 and 1 for best results. If you navigate the left map, the right map will show the same location to make it easier to spot the differeces between the LineStrings.
The LineString represents a part of the coastline of this place in Russia — found via an example implementation of the algorithm in python.
For a detailled explanation of the algorithm see the Wikipedia article or the original publication: David Douglas & Thomas Peucker, "Algorithms for the reduction of the number of points required to represent a digitized line or its caricature", The Canadian Cartographer 10(2), 112-122 (1973) (DOI: 10.3138/FM57-6770-U75U-7727).