public final class Polygon extends Geometry
| Constructor and Description | 
|---|
| Polygon(CoordinateReferenceSystem coordinateReferenceSystem,
       PolygonCoordinates coordinates)Construct an instance with the given coordinates and coordinate reference system. | 
| Polygon(List<Position> exterior,
       List<Position>... holes)Construct an instance with the given coordinates. | 
| Polygon(PolygonCoordinates coordinates)Construct an instance with the given coordinates. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object o) | 
| PolygonCoordinates | getCoordinates()Gets the GeoJSON coordinates of the polygon | 
| List<Position> | getExterior()Gets the exterior coordinates. | 
| List<List<Position>> | getHoles()Get the holes in this polygon. | 
| GeoJsonObjectType | getType()Gets the GeoJSON object type. | 
| int | hashCode() | 
| String | toString() | 
getCoordinateReferenceSystem, toJsonpublic Polygon(List<Position> exterior, List<Position>... holes)
exterior - the exterior ring of the polygonholes - optional interior rings of the polygonpublic Polygon(PolygonCoordinates coordinates)
coordinates - the coordinatespublic Polygon(CoordinateReferenceSystem coordinateReferenceSystem, PolygonCoordinates coordinates)
coordinateReferenceSystem - the coordinate reference systemcoordinates - the coordinatespublic GeoJsonObjectType getType()
Geometrypublic PolygonCoordinates getCoordinates()
public List<Position> getExterior()
public List<List<Position>> getHoles()