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

Name Description
p The array of coordinate points.
x Longitude.
y Latitude.
flags Displaying the flags:
  • 0x1 — show area;
  • 0x2 — show perimeter;
  • 0x3 — show both parameters.
w Line width, meters.

Returned result

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

Possible error codes:

Code Description
4 Wrong input parameters.

If you find a mistake in the text, please select it and press Ctrl+Enter.