Package org.apache.lucene.tests.geo
Class ShapeTestUtil
java.lang.Object
org.apache.lucene.tests.geo.ShapeTestUtil
generates random cartesian geometry; heavy reuse of
GeoTestUtil-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsSlowly(XYPolygon polygon, double x, double y) Simple slow point in polygon check (for testing)static XYPolygoncreateRegularPolygon(double centerX, double centerY, double radius, int gons) Makes an n-gon, centered at the provided x/y, and each vertex approximately distanceMeters away from the center.static XYRectanglestatic XYCirclestatic floatstatic XYLinenextLine()static XYPolygonreturns next pseudorandom polygonstatic XYPoint
-
Constructor Details
-
ShapeTestUtil
public ShapeTestUtil()
-
-
Method Details
-
nextPolygon
returns next pseudorandom polygon -
nextXYPoint
-
nextLine
-
nextCircle
-
nextBox
-
createRegularPolygon
public static XYPolygon createRegularPolygon(double centerX, double centerY, double radius, int gons) Makes an n-gon, centered at the provided x/y, and each vertex approximately distanceMeters away from the center.Do not invoke me across the dateline or a pole!!
-
nextFloat
-
containsSlowly
Simple slow point in polygon check (for testing)
-