14 lines
550 B
Plaintext
Raw Normal View History

2021-07-27 11:39:24 +02:00
{
"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.",
2021-07-27 11:39:24 +02:00
"arguments": [
{"arg":"geometry", "description": "Input curve (circularstring, linestring)"}
2021-07-27 11:39:24 +02:00
],
"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"}
2021-07-27 11:39:24 +02:00
]
}