Package org.apache.lucene.geo
Class XYPolygon
java.lang.Object
org.apache.lucene.geo.Geometry
org.apache.lucene.geo.XYGeometry
org.apache.lucene.geo.XYPolygon
Represents a polygon in cartesian space. You can construct the Polygon directly with
float[], float[] x, y arrays coordinates.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetHoles()Returns a copy of the internal holes arrayfloat[]getPolyX()Returns a copy of the internal x arrayfloatgetPolyX(int vertex) Returns x value at given indexfloat[]getPolyY()Returns a copy of the internal y arrayfloatgetPolyY(int vertex) Returns y value at given indexReturns the winding order (CW, COLINEAR, CCW) for the polygon shellinthashCode()intnumHoles()returns the number of holes for the polygonintreturns the number of vertex pointsprotected Component2Dget a Component2D from the geometry objecttoString()Methods inherited from class org.apache.lucene.geo.XYGeometry
create
-
Field Details
-
minX
public final float minXminimum x of this polygon's bounding box area -
maxX
public final float maxXmaximum x of this polygon's bounding box area -
minY
public final float minYminimum y of this polygon's bounding box area -
maxY
public final float maxYmaximum y of this polygon's bounding box area
-
-
Constructor Details
-
XYPolygon
Creates a new Polygon from the supplied x, y arrays, and optionally any holes.
-
-
Method Details
-
numPoints
public int numPoints()returns the number of vertex points -
getPolyX
public float[] getPolyX()Returns a copy of the internal x array -
getPolyX
public float getPolyX(int vertex) Returns x value at given index -
getPolyY
public float[] getPolyY()Returns a copy of the internal y array -
getPolyY
public float getPolyY(int vertex) Returns y value at given index -
getHoles
Returns a copy of the internal holes array -
getWindingOrder
Returns the winding order (CW, COLINEAR, CCW) for the polygon shell -
numHoles
public int numHoles()returns the number of holes for the polygon -
toComponent2D
Description copied from class:Geometryget a Component2D from the geometry object- Specified by:
toComponent2Din classGeometry
-
hashCode
public int hashCode() -
equals
-
toString
-