public class LatLonShape extends Object
This class defines six static factory methods for common indexing and search operations:
createIndexableFields(String, Polygon)
for indexing a geo polygon.
createIndexableFields(String, Line)
for indexing a geo linestring.
createIndexableFields(String, double, double)
for indexing a lat, lon geo point.
newBoxQuery()
for matching geo shapes that have some ShapeField.QueryRelation
with a bounding box.
newLineQuery()
for matching geo shapes that have some ShapeField.QueryRelation
with a linestring.
newPolygonQuery()
for matching geo shapes that have some ShapeField.QueryRelation
with a polygon.
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 | 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 Query |
newBoxQuery(String field,
ShapeField.QueryRelation queryRelation,
double minLatitude,
double maxLatitude,
double minLongitude,
double maxLongitude)
create a query to find all indexed geo shapes that intersect a defined bounding box
|
static Query |
newLineQuery(String field,
ShapeField.QueryRelation queryRelation,
Line... lines)
create a query to find all indexed geo shapes that intersect a provided linestring (or array of linestrings)
note: does not support dateline crossing
|
static Query |
newPolygonQuery(String field,
ShapeField.QueryRelation queryRelation,
Polygon... polygons)
create a query to find all indexed geo shapes that intersect a provided polygon (or array of polygons)
note: does not support dateline crossing
|
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, ShapeField.QueryRelation queryRelation, double minLatitude, double maxLatitude, double minLongitude, double maxLongitude)
public static Query newLineQuery(String field, ShapeField.QueryRelation queryRelation, Line... lines)
public static Query newPolygonQuery(String field, ShapeField.QueryRelation queryRelation, Polygon... polygons)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.