java.lang.Object
org.elasticsearch.lucene.spatial.Extent
Object representing the extent of a geometry object within a
TriangleTreeWriter
.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRectangle
(int bottomLeftX, int bottomLeftY, int topRightX, int topRightY) Adds the extent of two points representing a bounding box's bottom-left and top-right points.boolean
static Extent
fromPoint
(int x, int y) calculates the extent of a point, which is the point itself.static Extent
fromPoints
(int bottomLeftX, int bottomLeftY, int topRightX, int topRightY) calculates the extent of two points representing a bounding box's bottom-left and top-right points.int
hashCode()
int
maxX()
int
maxY()
int
minX()
int
minY()
void
reset
(int top, int bottom, int negLeft, int negRight, int posLeft, int posRight) toString()
-
Field Details
-
top
public int top -
bottom
public int bottom -
negLeft
public int negLeft -
negRight
public int negRight -
posLeft
public int posLeft -
posRight
public int posRight
-
-
Method Details
-
reset
public void reset(int top, int bottom, int negLeft, int negRight, int posLeft, int posRight) -
addRectangle
public void addRectangle(int bottomLeftX, int bottomLeftY, int topRightX, int topRightY) Adds the extent of two points representing a bounding box's bottom-left and top-right points. The bounding box must not cross the dateline.- Parameters:
bottomLeftX
- the bottom-left x-coordinatebottomLeftY
- the bottom-left y-coordinatetopRightX
- the top-right x-coordinatetopRightY
- the top-right y-coordinate
-
fromPoint
calculates the extent of a point, which is the point itself.- Parameters:
x
- the x-coordinate of the pointy
- the y-coordinate of the point- Returns:
- the extent of the point
-
fromPoints
calculates the extent of two points representing a bounding box's bottom-left and top-right points. It is important that these points accurately represent the bottom-left and top-right of the extent since there is no validation being done.- Parameters:
bottomLeftX
- the bottom-left x-coordinatebottomLeftY
- the bottom-left y-coordinatetopRightX
- the top-right x-coordinatetopRightY
- the top-right y-coordinate- Returns:
- the extent of the two points
-
minY
public int minY()- Returns:
- the minimum y-coordinate of the extent
-
maxY
public int maxY()- Returns:
- the maximum y-coordinate of the extent
-
minX
public int minX()- Returns:
- the absolute minimum x-coordinate of the extent, whether it is positive or negative.
-
maxX
public int maxX()- Returns:
- the absolute maximum x-coordinate of the extent, whether it is positive or negative.
-
equals
-
hashCode
public int hashCode() -
toString
-