mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
29 lines
1001 B
Plaintext
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"]
|
|
}
|