From ea346a785dc1b3f7c156f6fc33da634e1f1a627b Mon Sep 17 00:00:00 2001 From: Chris Schlaeger Date: Tue, 12 Aug 2014 21:56:44 +0200 Subject: Adding jquery, flot and openlayers to be included with the GEM. --- misc/openlayers/examples/simplify-linestring.html | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 misc/openlayers/examples/simplify-linestring.html (limited to 'misc/openlayers/examples/simplify-linestring.html') diff --git a/misc/openlayers/examples/simplify-linestring.html b/misc/openlayers/examples/simplify-linestring.html new file mode 100644 index 0000000..15160a0 --- /dev/null +++ b/misc/openlayers/examples/simplify-linestring.html @@ -0,0 +1,103 @@ + + + + + + + + Simplify a LineString geometry + + + + + +

Simplify a LineString geometry

+
+ Douglas-Peucker, Douglas, Peucker, Peuker, tolerance +
+

+ Shows the usage of the method "simplify" that implements + the Douglas-Peucker algorithm to remove "insignificant" + vertices from LineString geometries. +

+
+ + + + +
+
+
+
+
+
+
+
+

+ Instances of OpenLayers.Geometry.LineString have a method simplify, + that 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.Geometry.LineString::simplify 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. +

+

+ You can also use the button "Start animation" to get + results for increasing tolerance-factors from 0.02 to 1.0. The + animation can be paused by clicking on the button "Stop + animation". +

+

+ The LineString represents a part of the coastline of + this + place southeast of Novosibirsk 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). +

+

See simplify-linestring.js + for the source code of this example.

+
+ + + + -- cgit v1.2.3