public final class Polygon extends Geometry
Constructor | Description |
---|---|
Polygonβ(CoordinateReferenceSystem coordinateReferenceSystem,
PolygonCoordinates coordinates) |
Construct an instance with the given coordinates and coordinate reference system.
|
Polygonβ(PolygonCoordinates coordinates) |
Construct an instance with the given coordinates.
|
Polygonβ(List<Position> exterior,
List<Position>... holes) |
Construct an instance with the given coordinates.
|
Modifier and Type | Method | 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, toJson
public 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β(@Nullable CoordinateReferenceSystem coordinateReferenceSystem, PolygonCoordinates coordinates)
coordinateReferenceSystem
- the coordinate reference systemcoordinates
- the coordinatespublic GeoJsonObjectType getTypeβ()
Geometry
public PolygonCoordinates getCoordinatesβ()
public List<Position> getExteriorβ()
public List<List<Position>> getHolesβ()