Package org.apache.lucene.document
Class XYShapeDocValuesField
- java.lang.Object
-
- org.apache.lucene.document.Field
-
- org.apache.lucene.document.ShapeDocValuesField
-
- org.apache.lucene.document.XYShapeDocValuesField
-
- All Implemented Interfaces:
IndexableField
public final class XYShapeDocValuesField extends ShapeDocValuesField
Concrete implementation of aShapeDocValuesField
for cartesian geometries.This field should be instantiated through
XYShape.createDocValueField(String, XYLine)
XYShape.createDocValueField(String, XYPolygon)
for indexing a cartesian polygon doc value field.XYShape.createDocValueField(String, XYLine)
for indexing a cartesian linestring doc value.XYShape.createDocValueField(String, float, float)
for indexing a x, y cartesian point doc value.XYShape.createDocValueField(String, List)
for indexing a cartesian doc value from a precomputed tessellation.XYShape.createDocValueField(String, BytesRef)
for indexing a cartesian doc value from existing encoding.
LatLonPoint
, vertex values are indexed with some loss of precision from the originaldouble
values.- See Also:
PointValues
,XYDocValuesField
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.document.Field
Field.Store
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.document.ShapeDocValuesField
FIELD_TYPE, shapeDocValues
-
Fields inherited from class org.apache.lucene.document.Field
fieldsData, name, tokenStream, type
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
XYShapeDocValuesField(String name, List<ShapeField.DecodedTriangle> tessellation)
constructs aXYShapeDocValueField
from a pre-tessellated geometryprotected
XYShapeDocValuesField(String name, BytesRef binaryValue)
Creates aXYShapeDocValueField
from a given serialized value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
decodeX(int encoded)
decodes x coordinates from encoded spaceprotected double
decodeY(int encoded)
decodes y coordinates from encoded spaceXYRectangle
getBoundingBox()
retrieves the bounding box for the geometryXYPoint
getCentroid()
retrieves the centroid location for the geometry-
Methods inherited from class org.apache.lucene.document.ShapeDocValuesField
fieldType, getHighestDimensionType, name, newGeometryQuery, numberOfTerms, stringValue, tokenStream
-
Methods inherited from class org.apache.lucene.document.Field
binaryValue, getCharSequenceValue, invertableType, numericValue, readerValue, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setStringValue, setTokenStream, storedValue, tokenStreamValue, toString
-
-
-
-
Constructor Detail
-
XYShapeDocValuesField
protected XYShapeDocValuesField(String name, List<ShapeField.DecodedTriangle> tessellation)
constructs aXYShapeDocValueField
from a pre-tessellated geometry
-
-
Method Detail
-
getCentroid
public XYPoint getCentroid()
retrieves the centroid location for the geometry- Specified by:
getCentroid
in classShapeDocValuesField
-
getBoundingBox
public XYRectangle getBoundingBox()
Description copied from class:ShapeDocValuesField
retrieves the bounding box for the geometry- Specified by:
getBoundingBox
in classShapeDocValuesField
-
decodeX
protected double decodeX(int encoded)
Description copied from class:ShapeDocValuesField
decodes x coordinates from encoded space- Specified by:
decodeX
in classShapeDocValuesField
-
decodeY
protected double decodeY(int encoded)
Description copied from class:ShapeDocValuesField
decodes y coordinates from encoded space- Specified by:
decodeY
in classShapeDocValuesField
-
-