Package org.apache.lucene.geo
Class XYPolygon
java.lang.Object
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getHoles()
Returns a copy of the internal holes arrayfloat[]
getPolyX()
Returns a copy of the internal x arrayfloat
getPolyX
(int vertex) Returns x value at given indexfloat[]
getPolyY()
Returns a copy of the internal y arrayfloat
getPolyY
(int vertex) Returns y value at given indexReturns the winding order (CW, COLINEAR, CCW) for the polygon shellint
hashCode()
int
numHoles()
returns the number of holes for the polygonint
returns the number of vertex pointsprotected Component2D
get a Component2D from this 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:XYGeometry
get a Component2D from this object- Specified by:
toComponent2D
in classXYGeometry
-
hashCode
public int hashCode() -
equals
-
toString
-