2022-03-19 09:00:56 +01:00

19 lines
687 B
Plaintext

{
"name": "roundness",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Calculates how close a polygon shape is to a circle. The function Returns TRUE when the polygon shape is a perfect circle and 0 when it is completely flat.",
"arguments": [{
"arg": "geometry",
"description": "a polygon"
}],
"examples": [{
"expression": "round(roundness(geom_from_wkt('POLYGON(( 0 0, 0 1, 1 1, 1 0, 0 0))')), 3)",
"returns": "0.785"
}, {
"expression": "round(roundness(geom_from_wkt('POLYGON(( 0 0, 0 0.1, 1 0.1, 1 0, 0 0))')), 3)",
"returns": "0.260"
}],
"tags": ["polygon", "perfect", "flat", "close", "shape", "calculates", "circle"]
}