3.8. Polygon
Prev | Up | Chapter 3. Data Types | Home | Next

## 3.8. Polygon #

A spherical polygon is a closed spherical path where line segments cannot be crossed. One main use case are areas on the earth and sky sphere. Polygons within pgSphere have the same input syntax as paths:

    {pos1,pos2,pos3[,pos4[,... ]]}

### Note

- A spherical polygon has the same restrictions as a spherical path (see Section 3.7). Except that a polygon needs at least 3 positions.

- The line segments can not be crossed.

- The maximum dimension of a polygon must be less than 180°.

Example 3.11. Input of polygon

A polygon going from `(270d,-10d)`. via `(270d,30d)` to `(290d,10d)` back to `(270d,-10d)`

    sql> SELECT spoly '{ (270d,-10d), (270d,30d), (290d,10d) } ';

Prev | Up | Next
3.7. Path | Home | 3.9. Coordinates range