mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
19 lines
888 B
Plaintext
19 lines
888 B
Plaintext
{
|
|
"name": "simplify",
|
|
"type": "function",
|
|
"groups": ["GeometryGroup"],
|
|
"description": "Simplifies a geometry by removing nodes using a distance based threshold (ie, the Douglas Peucker algorithm). The algorithm preserves large deviations in geometries and reduces the number of vertices in nearly straight segments.",
|
|
"arguments": [{
|
|
"arg": "geometry",
|
|
"description": "a geometry"
|
|
}, {
|
|
"arg": "tolerance",
|
|
"description": "maximum deviation from straight segments for points to be removed"
|
|
}],
|
|
"examples": [{
|
|
"expression": "geom_to_wkt(simplify(geometry:=geom_from_wkt('LineString(0 0, 5 0.1, 10 0)'),tolerance:=5))",
|
|
"returns": "'LineString(0 0, 10 0)'"
|
|
}],
|
|
"tags": ["straight", "large", "deviations", "nodes", "algorithm", "reduces", "simplifies", "segments", "number", "threshold", "distance", "removing", "vertices", "based", "preserves"]
|
|
}
|