Polygon
Represents a closed polygon on the earth's surface. You can either construct the Polygon directly yourself with double[] coordinates, or use Polygon.fromGeoJSON if you have a polygon already encoded as a GeoJSON string.
NOTES:
Coordinates must be in clockwise order, except for holes. Holes must be in counter-clockwise order.
The polygon must be closed: the first and last coordinates need to have the same values.
The polygon must not be self-crossing, otherwise may result in unexpected behavior.
All latitude/longitude values must be in decimal degrees.
Polygons cannot cross the 180th meridian. Instead, use two polygons: one on each side.
For more advanced GeoSpatial indexing and query operations see the
spatial-extrasmodule
Functions
Returns latitude value at given index
Returns a copy of the internal latitude array
Returns longitude value at given index
Returns a copy of the internal longitude array
Returns the winding order (CW, COLINEAR, CCW) for the polygon shell