Package org.elasticsearch.geo
Class GeometryTestUtils
java.lang.Object
org.elasticsearch.geo.GeometryTestUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LinearRinglinearRing(double[] lons, double[] lats, boolean generateAlts) static org.apache.lucene.geo.PolygonReturns a Lucene polygon with non-zero area, so its vertices are not all collinear and the polygon survivesTessellator.static doublestatic CirclerandomCircle(boolean hasAlt) static GeometryrandomGeometry(boolean hasAlt) static GeometryrandomGeometry(boolean hasAlt, int maxPoints) protected static GeometryrandomGeometry(int level, boolean hasAlt) static GeometryrandomGeometry(ShapeType type, boolean hasAlt) static GeometryCollection<Geometry> randomGeometryCollection(boolean hasAlt) static GeometryCollection<Geometry> randomGeometryCollectionWithoutCircle(boolean hasAlt) static GeometryrandomGeometryWithoutCircle(boolean hasAlt, int maxPoints) static GeometryrandomGeometryWithoutCircle(int level, boolean hasAlt) static doublestatic LinerandomLine(boolean hasAlts) static doublestatic MultiLinerandomMultiLine(boolean hasAlt) static MultiPointrandomMultiPoint(boolean hasAlt) static MultiPolygonrandomMultiPolygon(boolean hasAlt) static Pointstatic PointrandomPoint(boolean hasAlt) static PolygonrandomPolygon(boolean hasAlt) static Rectanglestatic MultiPointtoMultiPoint(Geometry geometry) Extracts all vertices of the supplied geometry
-
Constructor Details
-
GeometryTestUtils
public GeometryTestUtils()
-
-
Method Details
-
randomLat
public static double randomLat() -
randomLon
public static double randomLon() -
randomAlt
public static double randomAlt() -
randomCircle
-
randomLine
-
randomPoint
-
randomPoint
-
nextLucenePolygon
public static org.apache.lucene.geo.Polygon nextLucenePolygon()Returns a Lucene polygon with non-zero area, so its vertices are not all collinear and the polygon survivesTessellator. Lucene'sGeoTestUtil.nextPolygonon its own occasionally returns degenerate polygons; callers that hand the result to the geo_shape indexer should use this wrapper. -
randomPolygon
-
linearRing
-
randomRectangle
-
randomMultiPoint
-
randomMultiLine
-
randomMultiPolygon
-
randomGeometryCollection
-
randomGeometryCollectionWithoutCircle
-
randomGeometry
-
randomGeometry
-
randomGeometry
-
randomGeometry
-
randomGeometryWithoutCircle
-
randomGeometryWithoutCircle
-
toMultiPoint
Extracts all vertices of the supplied geometry
-