mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
Just like the 'rotate' function, 'scale' accepts an optional point to apply the scaling from. If not specified, scaling is done from the centre of the geometry's bounding box.
14 lines
910 B
Plaintext
14 lines
910 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"}]
|
|
}
|