calculate_polygon
The calculate_polygon function is used to get a polygon area or/and perimeter.
svc=render/calculate_polygon¶ms={"p":[
{
"x":<double>,
"y":<double>
},
...
],
"flags":<uint>}
Parameters
| Name | Description |
|---|---|
| p | The array of polygon points. |
| x | Longitude. |
| y | Latitude. |
| flags | Displaying the flags:
|
Returned result
{
"area":<double>, /* area */
"perimeter":<double> /* perimeter */
}
Possible error codes:
| Code | Description |
|---|---|
| 4 | Wrong input parameters. |