Package org.elasticsearch.geo
Class ShapeTestUtils
java.lang.Object
org.elasticsearch.geo.ShapeTestUtils
generates random cartesian shapes
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublearea(org.apache.lucene.geo.XYPolygon p) static booleanextremePoint(Point point) Since cartesian centroid is stored in Float values, and calculations perform averages over many, We cannot support points at the very edge of the range.static double[]floatsToDoubles(float[] f) static doublestatic CirclerandomCircle(boolean hasAlt) static GeometryrandomGeometry(boolean hasAlt) static GeometryrandomGeometry(boolean hasAlt, int maxPoints) protected static GeometryrandomGeometry(int level, boolean hasAlt) static GeometryCollection<Geometry> randomGeometryCollection(boolean hasAlt) static GeometryCollection<Geometry> randomGeometryCollectionWithoutCircle(boolean hasAlt) protected static GeometryCollection<Geometry> randomGeometryCollectionWithoutCircle(int level, boolean hasAlt) static GeometryrandomGeometryWithoutCircle(boolean hasAlt) static GeometryrandomGeometryWithoutCircle(int level, boolean hasAlt) static LinerandomLine(boolean hasAlts) static MultiLinerandomMultiLine(boolean hasAlt) static MultiPointrandomMultiPoint(boolean hasAlt) static MultiPolygonrandomMultiPolygon(boolean hasAlt) static Pointstatic PointrandomPoint(boolean hasAlt) static Pointstatic PointrandomPointNotExtreme(boolean hasAlt) static PolygonrandomPolygon(boolean hasAlt) static Rectanglestatic double
-
Field Details
-
MIN_VALID_AREA
public static final double MIN_VALID_AREA- See Also:
-
-
Constructor Details
-
ShapeTestUtils
public ShapeTestUtils()
-
-
Method Details
-
randomValue
public static double randomValue() -
randomPoint
-
randomPoint
-
randomPointNotExtreme
-
randomPointNotExtreme
-
extremePoint
Since cartesian centroid is stored in Float values, and calculations perform averages over many, We cannot support points at the very edge of the range. -
randomAlt
public static double randomAlt() -
randomCircle
-
randomLine
-
randomPolygon
-
area
public static double area(org.apache.lucene.geo.XYPolygon p) -
floatsToDoubles
public static double[] floatsToDoubles(float[] f) -
randomRectangle
-
randomMultiPoint
-
randomMultiLine
-
randomMultiPolygon
-
randomGeometryCollection
-
randomGeometry
-
randomGeometry
-
randomGeometry
-
randomGeometryWithoutCircle
-
randomGeometryWithoutCircle
-
randomGeometryCollectionWithoutCircle
-
randomGeometryCollectionWithoutCircle
protected static GeometryCollection<Geometry> randomGeometryCollectionWithoutCircle(int level, boolean hasAlt)
-