The LineSimplification operator allows simplifying FeatureCollections of (multi-)lines or (multi-)polygons by removing vertices. Users can select a simplification algorithm and specify an epsilon for parametrization. Alternatively, they can omit the epsilon, which results in the epsilon being automatically determined by the query's spatial resolution.
LineSimplification
FeatureCollection
epsilon
For instance, you can remove the vertices of a large country polygon for drawing it on a small map. This results in a simpler polygon that is easier to draw and reduces the amount of data that needs to be transferred.
1.0
algorithm
douglasPeucker
visvalingam
"douglasPeucker"
The LineSimplification operator expects exactly one vector input.
vector
SingleVectorSource
MultiPolygon
MultiLineString
{ "type": "LineSimplification", "params": { "algorithm": "douglasPeucker", "epsilon": 1.0 }, "sources": { "vector": { "type": "OgrSource", "params": { "data": "ne_10m_admin_0_countries" } } } }
{ "type": "LineSimplification", "params": { "algorithm": "visvalingam" }, "sources": { "vector": { "type": "OgrSource", "params": { "data": "ne_10m_admin_0_countries" } } } }