mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
main angle of a geometry Returns the angle of the oriented minimum bounding box which covers the geometry value. Useful for data defined overrides in symbology of label expressions, e.g. to rotate labels to match the overall angle of a polygon, and similar for line pattern fills...
10 lines
517 B
Plaintext
10 lines
517 B
Plaintext
{
|
|
"name": "main_angle",
|
|
"type": "function",
|
|
"groups": ["GeometryGroup"],
|
|
"description":"Returns the main angle of a geometry (clockwise, in degrees from North), which represents the angle of the oriented minimal bounding rectangle which completely covers the geometry.",
|
|
"arguments": [ {"arg":"geometry","description":"a geometry"} ],
|
|
"examples": [ { "expression":"main_angle(geom_from_wkt('Polygon ((321577 129614, 321581 129618, 321585 129615, 321581 129610, 321577 129614))'))", "returns":"38.66"}]
|
|
}
|
|
|