2023-05-12 06:30:43 +10:00

29 lines
1001 B
Plaintext

{
"name": "scale",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns a scaled version of a geometry. Calculations are in the Spatial Reference System of this geometry.",
"arguments": [{
"arg": "geometry",
"description": "a geometry"
}, {
"arg": "x_scale",
"description": "x-axis scaling factor"
}, {
"arg": "y_scale",
"description": "y-axis scaling factor"
}, {
"arg": "center",
"optional": true,
"description": "scaling center point. If not specified, the center of the geometry's bounding box is used."
}],
"examples": [{
"expression": "scale(@geometry, 2, 0.5, make_point(4, 5))",
"returns": "geometry scaled twice horizontally and halved vertically, around the (4, 5) point"
}, {
"expression": "scale(@geometry, 2, 0.5)",
"returns": "geometry twice horizontally and halved vertically, around the center of its bounding box"
}],
"tags": ["scaled", "spatial", "affine", "calculations", "resize"]
}