lbartoletti aaede28b43 [feature] Add expression for square by diagonal and rectangle from 3 points
With the new class QgsQuadrilateral, we can add expressions to create a square by a diagonal and rectangles by 3 points
2019-01-17 03:42:20 +11:00

15 lines
582 B
Plaintext

{
"name": "make_square",
"type": "function",
"description": "Creates a square from a diagonal.",
"variableLenArguments": true,
"arguments": [
{"arg":"point1", "description": "First point of the regular polygon"},
{"arg":"point2", "description": "Second point"}
],
"examples": [
{ "expression":"geom_to_wkt(make_square( make_point(0,0), make_point(5,5)))", "returns":"'Polygon ((0 0, -0 5, 5 5, 5 0, 0 0))'"},
{ "expression":"geom_to_wkt(make_square( make_point(5,0), make_point(5,5)))", "returns":"'Polygon ((5 0, 2.5 2.5, 5 5, 7.5 2.5, 5 0))'"}
]
}