2019-01-16 17:42:20 +01:00
|
|
|
{
|
|
|
|
"name": "make_square",
|
|
|
|
"type": "function",
|
2020-07-02 01:46:48 +01:00
|
|
|
"groups": ["GeometryGroup"],
|
2019-01-16 17:42:20 +01:00
|
|
|
"description": "Creates a square from a diagonal.",
|
|
|
|
"arguments": [
|
2020-08-13 17:50:46 +02:00
|
|
|
{"arg":"point1", "description": "First point of the diagonal"},
|
2020-08-13 16:32:45 +02:00
|
|
|
{"arg":"point2", "description": "Last point of the diagonal"}
|
2019-01-16 17:42:20 +01:00
|
|
|
],
|
|
|
|
"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))'"}
|
|
|
|
]
|
|
|
|
}
|