Calculate polygon area and/or perimeter

In order to get polygon area and/or perimeter useĀ render/calculate_polygon:

svc=render/calculate_polygon&params={"p":[
                                        {
                                           "x":<double>,
                                           "y":<double>
                                        },
                                        ...
                                     ],
                                     "flags":<uint>}

Perimeters

Param Description
p polygon points coordinates array
x longitude
y latitude
flags display flags:
0x1 – show area;
0x2 – show parameter;
0x3 – show both params

Response

{
    "area":<double>,      /* area */
    "perimeter":<double>  /* perimeter */
}