public final class ShapeField extends Object
Polygon
's and Line
's are decomposed into a triangular mesh using the Tessellator
utility class.
Each ShapeField.Triangle
is encoded by this base class and indexed as a seven dimension multi-value field.
Finding all shapes that intersect a range (e.g., bounding box), or target shape, at search time is efficient.
This class defines the static methods for encoding the three vertices of a tessellated triangles as a seven dimension point. The coordinates are converted from double precision values into 32 bit integers so they are sortable at index time.
Modifier and Type | Class and Description |
---|---|
static class |
ShapeField.QueryRelation
Query Relation Types
|
static class |
ShapeField.Triangle
polygons are decomposed into tessellated triangles using
Tessellator
these triangles are encoded and inserted as separate indexed POINT fields |
Modifier and Type | Field and Description |
---|---|
protected static FieldType |
TYPE
tessellated triangles are seven dimensions; the first four are the bounding box index dimensions
|
Modifier and Type | Method and Description |
---|---|
static void |
decodeTriangle(byte[] t,
int[] triangle)
Decode a triangle encoded by
encodeTriangle(byte[], int, int, int, int, int, int) . |
static void |
encodeTriangle(byte[] bytes,
int aLat,
int aLon,
int bLat,
int bLon,
int cLat,
int cLon)
A triangle is encoded using 6 points and an extra point with encoded information in three bits of how to reconstruct it.
|
protected static final FieldType TYPE
public static void encodeTriangle(byte[] bytes, int aLat, int aLon, int bLat, int bLon, int cLat, int cLon)
public static void decodeTriangle(byte[] t, int[] triangle)
encodeTriangle(byte[], int, int, int, int, int, int)
.Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.