QGIS/resources/function_help/json/make_rectangle_3points
Salvatore Fiandaca 2c9a97dff1
Merge pull request #44380 from pigreco/toto
correction examples expr: make_rectangle_3points
2021-07-27 08:18:06 +10:00

18 lines
1.1 KiB
Plaintext

{
"name": "make_rectangle_3points",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Creates a rectangle from 3 points.",
"arguments": [
{"arg":"point1", "description": "First point."},
{"arg":"point2", "description": "Second point."},
{"arg":"point3", "description": "Third point."},
{"arg":"option", "optional": true, "default": "0", "description":
"An optional argument to construct the rectangle. By default this value is 0. Value can be 0 (distance) or 1 (projected). Option distance: Second distance is equal to the distance between 2nd and 3rd point. Option projected: Second distance is equal to the distance of the perpendicular projection of the 3rd point on the segment or its extension."}
],
"examples": [
{ "expression":"geom_to_wkt(make_rectangle_3points(make_point(0, 0), make_point(0,5), make_point(5, 5), 0)))", "returns":"'Polygon ((0 0, 0 5, 5 5, 5 0, 0 0))'"},
{ "expression":"geom_to_wkt(make_rectangle_3points(make_point(0, 0), make_point(0,5), make_point(5, 3), 1)))", "returns":"'Polygon ((0 0, 0 5, 5 5, 5 0, 0 0))'"}
]
}