public class XYShape extends Object
This class defines seven static factory methods for common indexing and search operations:
createIndexableFields(String, XYPolygon)
for indexing a cartesian polygon.
createIndexableFields(String, XYLine)
for indexing a cartesian linestring.
createIndexableFields(String, float, float)
for indexing a x, y cartesian point.
newBoxQuery()
for matching cartesian shapes that have some ShapeField.QueryRelation
with a bounding box.
newLineQuery()
for matching cartesian shapes that have some ShapeField.QueryRelation
with a linestring.
newPolygonQuery()
for matching cartesian shapes that have some ShapeField.QueryRelation
with a polygon.
newGeometryQuery()
for matching cartesian shapes that have some ShapeField.QueryRelation
with one or more XYGeometry
.
LatLonPoint
, vertex values are indexed with some loss of precision from the
original double
values.PointValues
,
LatLonDocValuesField
Modifier and Type | Method and Description |
---|---|
static Field[] |
createIndexableFields(String fieldName,
float x,
float y)
create indexable fields for cartesian point geometry
|
static Field[] |
createIndexableFields(String fieldName,
XYLine line)
create indexable fields for cartesian line geometry
|
static Field[] |
createIndexableFields(String fieldName,
XYPolygon polygon)
create indexable fields for cartesian polygon geometry
|
static Query |
newBoxQuery(String field,
ShapeField.QueryRelation queryRelation,
float minX,
float maxX,
float minY,
float maxY)
create a query to find all cartesian shapes that intersect a defined bounding box
|
static Query |
newDistanceQuery(String field,
ShapeField.QueryRelation queryRelation,
XYCircle... circle)
create a query to find all cartesian shapes that intersect a provided circle (or arrays of circles)
|
static Query |
newGeometryQuery(String field,
ShapeField.QueryRelation queryRelation,
XYGeometry... xyGeometries)
create a query to find all indexed geo shapes that intersect a provided geometry collection
note: Components do not support dateline crossing
|
static Query |
newLineQuery(String field,
ShapeField.QueryRelation queryRelation,
XYLine... lines)
create a query to find all cartesian shapes that intersect a provided linestring (or array of linestrings)
|
static Query |
newPointQuery(String field,
ShapeField.QueryRelation queryRelation,
float[]... points)
create a query to find all indexed shapes that comply the
ShapeField.QueryRelation with the provided point |
static Query |
newPolygonQuery(String field,
ShapeField.QueryRelation queryRelation,
XYPolygon... polygons)
create a query to find all cartesian shapes that intersect a provided polygon (or array of polygons)
|
public static Field[] createIndexableFields(String fieldName, XYPolygon polygon)
public static Field[] createIndexableFields(String fieldName, XYLine line)
public static Field[] createIndexableFields(String fieldName, float x, float y)
public static Query newBoxQuery(String field, ShapeField.QueryRelation queryRelation, float minX, float maxX, float minY, float maxY)
public static Query newLineQuery(String field, ShapeField.QueryRelation queryRelation, XYLine... lines)
public static Query newPolygonQuery(String field, ShapeField.QueryRelation queryRelation, XYPolygon... polygons)
public static Query newPointQuery(String field, ShapeField.QueryRelation queryRelation, float[]... points)
ShapeField.QueryRelation
with the provided pointpublic static Query newDistanceQuery(String field, ShapeField.QueryRelation queryRelation, XYCircle... circle)
public static Query newGeometryQuery(String field, ShapeField.QueryRelation queryRelation, XYGeometry... xyGeometries)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.