|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.search.spatial.impl.SpatialHelper
public abstract class SpatialHelper
Spatial fields, ids generator and geometric calculation methods for use in SpatialFieldBridge
SpatialFieldBridgeByQuadTree
,
SpatialFieldBridgeByRange
Method Summary | |
---|---|
static int |
findBestQuadTreeLevelForSearchRange(double searchRange)
If point are searched at d distance from a point, a certain quad tree cell level will problem quad tree cell that are big enough to contain the search area but the smallest possible. |
static String |
formatFieldName(int quadTreeLevel,
String fieldName)
|
static String |
formatLatitude(String fieldName)
|
static String |
formatLongitude(String fieldName)
|
static String |
formatQuadTreeCellId(int xIndex,
int yIndex)
|
static int |
getCellIndex(double coordinate,
double range,
int quadTreeLevel)
Generate a Cell Index on one axis |
static String |
getQuadTreeCellId(Point point,
int quadTreeLevel)
Generate a Quad Tree Cell Id (with both Cell Index on both dimension in it) for a position |
static List<String> |
getQuadTreeCellsIds(Point center,
double radius,
int quadTreeLevel)
Generate a Quad Tree Cell Ids List for the bounding box of a circular search area |
static List<String> |
getQuadTreeCellsIds(Point lowerLeft,
Point upperRight,
int quadTreeLevel)
Generate a Quad Tree Cell Ids List covered by a bounding box |
static double[] |
projectToIndexSpace(Point point)
Project a degree latitude/longitude point into a sinusoidal projection planar space for quad tree cell ids computation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int getCellIndex(double coordinate, double range, int quadTreeLevel)
coordinate
- position to compute the Index forrange
- range of the axis (-pi,pi)/(-90,90) => 2*pi/180 e.gquadTreeLevel
- Hox many time the range has been split in two
public static String getQuadTreeCellId(Point point, int quadTreeLevel)
point
- position to compute the Quad Tree Cell Id forquadTreeLevel
- Hox many time the dimensions have been split in two
public static List<String> getQuadTreeCellsIds(Point lowerLeft, Point upperRight, int quadTreeLevel)
lowerLeft
- lower left corner of the bounding boxupperRight
- upper right corner of the bounding boxquadTreeLevel
- quad tree level of the wanted cell ids
public static List<String> getQuadTreeCellsIds(Point center, double radius, int quadTreeLevel)
center
- center of the search arearadius
- radius of the search areaquadTreeLevel
- Quad Tree level of the wanted cell ids
public static int findBestQuadTreeLevelForSearchRange(double searchRange)
searchRange
- search range to be covered by the quad tree cells
public static double[] projectToIndexSpace(Point point)
point
- point to be projected
public static String formatFieldName(int quadTreeLevel, String fieldName)
public static String formatLatitude(String fieldName)
public static String formatLongitude(String fieldName)
public static String formatQuadTreeCellId(int xIndex, int yIndex)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |