public class Polygon extends Geometry
| Constructor and Description |
|---|
Polygon()
Constructor
|
Polygon(List<LineString> rings)
Constructor
|
Polygon(Polygon polygon)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static Polygon |
fromCoordinates(List<List<Position>> coordinates)
Create a polygon from coordinates
|
List<List<Position>> |
getCoordinates()
Returns coordinates as a GeoJSON Position list
|
Geometry |
getGeometry()
Get the simple geometry
|
GeometryType |
getGeometryType()
Get the geometry type
|
Polygon |
getPolygon()
Get the simple features polygon
|
List<LineString> |
getRings()
Get the rings
|
void |
setCoordinates(List<List<Position>> coordinates)
Sets the coordinates from a GeoJSON Position list
|
void |
setPolygon(Polygon polygon)
Set the simple features polygon
|
void |
setRings(List<LineString> rings)
Set the rings
|
getBbox, getForeignMember, getForeignMembers, hasForeignMember, hasForeignMembers, setBbox, setForeignMemberpublic Polygon()
public Polygon(List<LineString> rings)
rings - ring line string listpublic Polygon(Polygon polygon)
polygon - simple polygonpublic static Polygon fromCoordinates(List<List<Position>> coordinates)
coordinates - coordinatespublic GeometryType getGeometryType()
getGeometryType in class Geometrypublic Geometry getGeometry()
getGeometry in class Geometrypublic List<List<Position>> getCoordinates()
public void setCoordinates(List<List<Position>> coordinates)
coordinates - coordinatespublic List<LineString> getRings()
public void setRings(List<LineString> rings)
rings - list of ring line stringspublic Polygon getPolygon()
public void setPolygon(Polygon polygon)
polygon - polygonCopyright © 2021 National Geospatial-Intelligence Agency. All rights reserved.