Class PolygonGenerator

java.lang.Object
org.opensearch.geo.algorithm.PolygonGenerator

public class PolygonGenerator extends Object
Helper class to generate a polygon. Keeping this in the src folder so that GeoSpatial plugin can take advantage of this helper to create the Polygons, rather than hardcoding the values.
  • Constructor Details

    • PolygonGenerator

      public PolygonGenerator()
  • Method Details

    • generatePolygon

      public static List<double[]> generatePolygon(List<Double> xPool, List<Double> yPool, Random random)
      A helper function to create the Polygons for testing. The returned list of double array where first element contains all the X points and second contains all the Y points.
      Parameters:
      xPool - a List of Double
      yPool - a List of Double
      Returns:
      a List of double array.