calculate_polyline

The calculate_polyline function is used to get a polyline area and/or perimeter.

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

Parameters

NameDescription
pThe array of coordinate points.
xLongitude.
yLatitude.
flagsDisplaying the flags:
  • 0x1 — show area;
  • 0x2 — show perimeter;
  • 0x3 — show both parameters.
wLine width, metres.

Returned result

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

Possible error codes:

CodeDescription
4

Wrong input parameters.

Download PDF file
Download Word document

See also