Skip to content

Commit

Permalink
Improve sinuosity help
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Houska1 authored and nyalldawson committed Jul 30, 2021
1 parent 473ac47 commit 1d845c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resources/function_help/json/sinuosity
Expand Up @@ -2,9 +2,9 @@
"name": "sinuosity",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns the sinuosity of a geometry. The geometry must be a curve (circularstring, linestring).",
"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": "The geometry."}
{"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"},
Expand Down

4 comments on commit 1d845c8

@Houska1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DelazJ, I went to QGIS-Documentation to make an analogous change in user_manual/working_with_vector/expression_help/GeometryGroup.rst, but I note at top of that file that those docs seem to be autogenerated from the help files here. Do I need to do anything more there (or here, or elsewhere) for this change to eventually make its way into the docs?

@DelazJ
Copy link
Contributor

@DelazJ DelazJ commented on 1d845c8 Jul 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Houska1 you need to run python3 scripts/populate_expressions_list.py from the docs repo.
See https://github.com/qgis/QGIS-Documentation/blob/master/scripts/populate_expressions_list.py

@DelazJ
Copy link
Contributor

@DelazJ DelazJ commented on 1d845c8 Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Houska1
Copy link
Contributor Author

@Houska1 Houska1 commented on 1d845c8 Aug 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! (was on vacation last week).

Please sign in to comment.