|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRefiner
org.gcube.indexmanagement.geoindexlookup.defaultplugins.refinement.PolygonalRefiner
public class PolygonalRefiner
A Refiner which refines based on whether a polygonal query overlaps/contains/is-inside entries.This RankEvaluator will work with any GeoIndexType.
Constructor Summary | |
---|---|
PolygonalRefiner()
|
Method Summary | |
---|---|
static Envelope |
getBoundingBox(Polygon sp)
A method to get the Minimum Bounding Rectanngle of a polygon (as a jts Envelope object). |
void |
initialize(java.lang.String[] args)
|
boolean |
isHit(DataWrapper entry)
|
boolean |
isIndexTypeCompatible(GeoIndexType indexType)
|
static boolean |
isPointInsidePolygon(long x,
long y,
Polygon sp,
boolean isBoundaryInside)
A method to check whether a point is inside a polygon ****************************************************************** ****************************************************************** ** Algorithm used to determine if a point is inside a polygon ** ** ____________________________ ** ** _/ \ ** ** _/ X | ** ** _/ | / ** ** | __________|_(crossing 1)__/ ** ** | / | ** ** | | | ** ** | \__________|_(crossing 2)___ ** ** \_ | \ ** ** \_ | | ** ** \_ | / ** ** \___________|_(crossing 3)__/ ** ** | ** ** | ** ** V ** ** ** ** 3 crossings; 3 is an odd number; therefore inside ** ** ** ****************************************************************** ****************************************************************** |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolygonalRefiner()
Method Detail |
---|
public boolean isIndexTypeCompatible(GeoIndexType indexType)
public boolean isHit(DataWrapper entry)
public void initialize(java.lang.String[] args) throws RefinerInitializationException
RefinerInitializationException
public static boolean isPointInsidePolygon(long x, long y, Polygon sp, boolean isBoundaryInside)
x
- -
The X coordinate of the point to check whether is inside the
polygon.y
- -
The X coordinate of the point to check whether is inside the
polygon.sp
- -
The polygon to check whether contains the point.isBoundaryInside
- -
An indicator of whether a point residing on the border is to
be considered as inside the polygon.
public static Envelope getBoundingBox(Polygon sp)
sp
- -
The polygon of which to get the Minimum Bounding Rectangle
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |