Package com.mindee.geometry
Class Polygon
- java.lang.Object
-
- com.mindee.geometry.Polygon
-
public class Polygon extends Object
Contains any number of vertex coordinates (Points).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPolygon.PolygonBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Polygon.PolygonBuilderbuilder()booleanequals(Object object)BboxgetAsBbox()Get the polygon as a Bbox.PointgetCentroid()Get the central coordinates (centroid) of the Polygon.List<Point>getCoordinates()Position information as a list of points in clockwise order.MinMaxgetMinMaxX()Get the maximum and minimum Y coordinates.MinMaxgetMinMaxY()Get the maximum and minimum Y coordinates.booleanisEmpty()Returns true if there are no coordinates.StringtoString()
-
-
-
Method Detail
-
getAsBbox
public Bbox getAsBbox()
Get the polygon as a Bbox.
-
getCentroid
public Point getCentroid()
Get the central coordinates (centroid) of the Polygon.
-
getMinMaxY
public MinMax getMinMaxY()
Get the maximum and minimum Y coordinates.
-
getMinMaxX
public MinMax getMinMaxX()
Get the maximum and minimum Y coordinates.
-
isEmpty
public boolean isEmpty()
Returns true if there are no coordinates.
-
builder
public static Polygon.PolygonBuilder builder()
-
-