Class PolygonBound
java.lang.Object
org.apache.druid.collections.spatial.search.RectangularBound
org.apache.druid.collections.spatial.search.PolygonBound
- All Implemented Interfaces:
Bound<float[],ImmutableFloatPoint>
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(float[] coords) booleanfilter(Iterable<ImmutableFloatPoint> points) static PolygonBoundfrom(float[] abscissa, float[] ordinate) static PolygonBoundfrom(float[] abscissa, float[] ordinate, int limit) abscissa and ordinate contain the coordinates of polygon.float[]byte[]float[]inthashCode()Methods inherited from class org.apache.druid.collections.spatial.search.RectangularBound
containsObj, getLimit, getMaxCoords, getMinCoords, getNumDims, overlaps
-
Method Details
-
from
abscissa and ordinate contain the coordinates of polygon. abscissa[i] is the horizontal coordinate for the i'th corner of the polygon, and ordinate[i] is the vertical coordinate for the i'th corner. The polygon must have more than 2 corners, so the length of abscissa or ordinate must be equal or greater than 3. if the polygon is a rectangular, which corners are {0.0, 0.0}, {0.0, 1.0}, {1.0, 1.0}, {1.0, 0.0}, the abscissa should be {0.0, 0.0, 1.0, 1.0} and ordinate should be {0.0, 1.0, 1.0, 0.0} -
from
-
getOrdinate
public float[] getOrdinate() -
getAbscissa
public float[] getAbscissa() -
contains
public boolean contains(float[] coords) - Specified by:
containsin interfaceBound<float[],ImmutableFloatPoint> - Overrides:
containsin classRectangularBound
-
filter
- Specified by:
filterin interfaceBound<float[],ImmutableFloatPoint> - Overrides:
filterin classRectangularBound
-
getCacheKey
public byte[] getCacheKey()- Specified by:
getCacheKeyin interfaceBound<float[],ImmutableFloatPoint> - Overrides:
getCacheKeyin classRectangularBound
-
equals
- Overrides:
equalsin classRectangularBound
-
hashCode
public int hashCode()- Overrides:
hashCodein classRectangularBound
-