mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
Added explanation what this new expression actually calculates, based on help coded in /src/core/geometry/qgscurve.h Also streamlined noted requirement that needs to be applied to a curve.
14 lines
572 B
Plaintext
14 lines
572 B
Plaintext
{
|
|
"name": "sinuosity",
|
|
"type": "function",
|
|
"groups": ["GeometryGroup"],
|
|
"description": "Returns the sinuosity of a curve, which is the ratio of the curve length to the straight (2D) distance between its endpoints.",
|
|
"arguments": [
|
|
{"arg":"geometry", "description": "Curve (circularstring, linestring) whose sinuosity to evaluate"}
|
|
],
|
|
"examples": [
|
|
{ "expression":"round(sinuosity(geom_from_wkt('LINESTRING(2 0, 2 2, 3 2, 3 3)')), 3)", "returns":"1.265"},
|
|
{ "expression":"sinuosity(geom_from_wkt('LINESTRING( 3 1, 5 1)'))", "returns":"1.0"}
|
|
]
|
|
}
|