public class LatLonShape extends Object
 Polygon's are decomposed into a triangular mesh using the Tessellator utility class
 Each Tessellator.Triangle is encoded and indexed as a multi-value field.
 
Finding all shapes that intersect a range (e.g., bounding box) at search time is efficient.
This class defines static factory methods for common operations:
createIndexableFields(String, Polygon) for matching polygons that intersect a bounding box.
   newBoxQuery() for matching polygons that intersect a bounding box.
 LatLonPoint, vertex values are indexed with some loss of precision from the
 original double values (4.190951585769653E-8 for the latitude component
 and 8.381903171539307E-8 for longitude).PointValues, 
LatLonDocValuesField| Modifier and Type | Class and Description | 
|---|---|
static class  | 
LatLonShape.QueryRelation
Query Relation Types 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static int | 
BYTES  | 
protected static FieldType | 
TYPE  | 
| Modifier and Type | Method and Description | 
|---|---|
static Field[] | 
createIndexableFields(String fieldName,
                     double lat,
                     double lon)
create indexable fields for point geometry 
 | 
static Field[] | 
createIndexableFields(String fieldName,
                     Line line)
create indexable fields for line geometry 
 | 
static Field[] | 
createIndexableFields(String fieldName,
                     Polygon polygon)
create indexable fields for polygon geometry 
 | 
static int | 
decodeTriangleBoxVal(byte[] encoded,
                    int offset)
counterpart to  
encodeTriangleBoxVal(int, byte[], int); decodes encoded triangle bounding box values | 
static void | 
encodeTriangleBoxVal(int encodedVal,
                    byte[] bytes,
                    int offset)
encodes bounding box value of triangle. 
 | 
static Query | 
newBoxQuery(String field,
           LatLonShape.QueryRelation queryRelation,
           double minLatitude,
           double maxLatitude,
           double minLongitude,
           double maxLongitude)
create a query to find all polygons that intersect a defined bounding box 
 | 
static Query | 
newLineQuery(String field,
            LatLonShape.QueryRelation queryRelation,
            Line... lines)
create a query to find all polygons that intersect a provided linestring (or array of linestrings)
  note: does not support dateline crossing 
 | 
static Query | 
newPolygonQuery(String field,
               LatLonShape.QueryRelation queryRelation,
               Polygon... polygons)
create a query to find all polygons that intersect a provided polygon (or array of polygons)
  note: does not support dateline crossing 
 | 
public static final int BYTES
protected static final FieldType TYPE
public static Field[] createIndexableFields(String fieldName, Polygon polygon)
public static Field[] createIndexableFields(String fieldName, Line line)
public static Field[] createIndexableFields(String fieldName, double lat, double lon)
public static Query newBoxQuery(String field, LatLonShape.QueryRelation queryRelation, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude)
public static Query newLineQuery(String field, LatLonShape.QueryRelation queryRelation, Line... lines)
public static Query newPolygonQuery(String field, LatLonShape.QueryRelation queryRelation, Polygon... polygons)
public static void encodeTriangleBoxVal(int encodedVal,
                                        byte[] bytes,
                                        int offset)
public static int decodeTriangleBoxVal(byte[] encoded,
                                       int offset)
encodeTriangleBoxVal(int, byte[], int); decodes encoded triangle bounding box valuesCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.