org.apache.lucene.geo

## Class ShapeTestUtil

- java.lang.Object
- - org.apache.lucene.geo.ShapeTestUtil

-     public class ShapeTestUtil
      extends Object

  generates random cartesian geometry; heavy reuse of `GeoTestUtil`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ShapeTestUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `containsSlowly(XYPolygon polygon, double x, double y)` Simple slow point in polygon check (for testing)
    `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.
    `static XYRectangle` | `nextBox(Random random)`
    `static XYCircle` | `nextCircle()`
    `static float` | `nextFloat(Random random)`
    `static XYLine` | `nextLine()`
    `static XYPoint` | `nextPoint()`
    `static XYPolygon` | `nextPolygon()` returns next pseudorandom polygon

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ShapeTestUtil

          public ShapeTestUtil()

  - ### Method Detail

    - #### nextPolygon

          public static XYPolygon nextPolygon()

      returns next pseudorandom polygon

    - #### nextPoint

          public static XYPoint nextPoint()

    - #### nextLine

          public static XYLine nextLine()

    - #### nextCircle

          public static XYCircle nextCircle()

    - #### nextBox

          public static XYRectangle nextBox(Random random)

    - #### 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

          public static float nextFloat(Random random)

    - #### containsSlowly

          public static boolean containsSlowly(XYPolygon polygon,
                                               double x,
                                               double y)

      Simple slow point in polygon check (for testing)

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.