Package org.apache.lucene.document
Class LatLonShapeDocValues
java.lang.Object
org.apache.lucene.document.LatLonShapeDocValues
A concrete implementation of
ShapeDocValues
for storing binary doc value representation
of LatLonShape
geometries in a LatLonShapeDocValuesField
Note: This class cannot be instantiated directly. See LatLonShape
for factory API
based on different geometries.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Geometry
the bounding box of the shape docvalueprotected final Geometry
the centroid of the shape docvalueprotected final org.apache.lucene.document.ShapeDocValues.ShapeComparator
the geometry comparator used to check relationsprotected static final byte
doc value format version; used to support bwc for any encoding changes -
Constructor Summary
ModifierConstructorDescriptionprotected
LatLonShapeDocValues
(List<ShapeField.DecodedTriangle> tessellation) protected ctor for instantiating a lat lon doc value based on a tessellationprotected
LatLonShapeDocValues
(BytesRef binaryValue) protected ctor for instantiating a lat lon doc value based on an already retrieved binary format -
Method Summary
Modifier and TypeMethodDescriptionprotected BytesRef
returns the encoded doc values field as aBytesRef
protected Rectangle
protected Point
protected int
Retrieves the encoded x centroid location for the geometry(s)protected int
Retrieves the encoded y centroid location for the geometry(s)int
returns the max x value for the shape's bounding boxint
returns the max y value for the shape's bounding boxint
returns the min x value for the shape's bounding boxint
returns the min y value for the shape's bounding boxprotected org.apache.lucene.document.ShapeDocValues.Encoder
Retrieves the highest dimensional type (POINT, LINE, TRIANGLE) for computing the geometry(s) centroidstatic Query
newGeometryQuery
(String field, ShapeField.QueryRelation relation, Object... geometries) Creates a geometry query for shape docvaluesint
Returns the number of terms (tessellated triangles) for this shaperelate
(Component2D component) protected static int
vIntSize
(int i) Computes the variable Integer size in bytesprotected static int
vLongSize
(long i) Computes the variable Long size in bytes
-
Field Details
-
VERSION
protected static final byte VERSIONdoc value format version; used to support bwc for any encoding changes- See Also:
-
shapeComparator
protected final org.apache.lucene.document.ShapeDocValues.ShapeComparator shapeComparatorthe geometry comparator used to check relations -
centroid
the centroid of the shape docvalue -
boundingBox
the bounding box of the shape docvalue
-
-
Constructor Details
-
LatLonShapeDocValues
protected ctor for instantiating a lat lon doc value based on a tessellation -
LatLonShapeDocValues
protected ctor for instantiating a lat lon doc value based on an already retrieved binary format
-
-
Method Details
-
getCentroid
-
getBoundingBox
-
computeCentroid
-
computeBoundingBox
-
getEncoder
protected org.apache.lucene.document.ShapeDocValues.Encoder getEncoder() -
binaryValue
returns the encoded doc values field as aBytesRef
-
numberOfTerms
public int numberOfTerms()Returns the number of terms (tessellated triangles) for this shape -
getEncodedMinX
public int getEncodedMinX()returns the min x value for the shape's bounding box -
getEncodedMinY
public int getEncodedMinY()returns the min y value for the shape's bounding box -
getEncodedMaxX
public int getEncodedMaxX()returns the max x value for the shape's bounding box -
getEncodedMaxY
public int getEncodedMaxY()returns the max y value for the shape's bounding box -
getEncodedCentroidX
protected int getEncodedCentroidX()Retrieves the encoded x centroid location for the geometry(s) -
getEncodedCentroidY
protected int getEncodedCentroidY()Retrieves the encoded y centroid location for the geometry(s) -
getHighestDimension
Retrieves the highest dimensional type (POINT, LINE, TRIANGLE) for computing the geometry(s) centroid -
newGeometryQuery
public static Query newGeometryQuery(String field, ShapeField.QueryRelation relation, Object... geometries) Creates a geometry query for shape docvalues -
relate
- Throws:
IOException
-
vLongSize
protected static int vLongSize(long i) Computes the variable Long size in bytes -
vIntSize
protected static int vIntSize(int i) Computes the variable Integer size in bytes
-