Class BBoxCalculator
java.lang.Object
org.locationtech.spatial4j.shape.impl.BBoxCalculator
(INTERNAL) Calculates the minimum bounding box given a bunch of rectangles (ranges). It's a temporary object and not
thread-safe; throw it away when done.
For a cartesian space, the calculations are trivial but it is not for geodetic. For
geodetic, it must maintain an ordered set of disjoint ranges as each range is provided.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
expandRange
(double minX, double maxX, double minY, double maxY) void
expandRange
(Rectangle rect) void
expandXRange
(double minX, double maxX) double
getMaxX()
double
getMaxY()
double
getMinX()
double
getMinY()
private void
private static boolean
rangeContains
(double minX, double maxX, double x)
-
Field Details
-
ctx
-
minY
private double minY -
maxY
private double maxY -
minX
private double minX -
maxX
private double maxX -
ranges
Sorted list of disjoint X ranges keyed by maxX and with minX stored as the "value".
-
-
Constructor Details
-
BBoxCalculator
-
-
Method Details
-
expandRange
-
expandRange
public void expandRange(double minX, double maxX, double minY, double maxY) -
expandXRange
public void expandXRange(double minX, double maxX) -
processRanges
private void processRanges() -
rangeContains
private static boolean rangeContains(double minX, double maxX, double x) -
doesXWorldWrap
public boolean doesXWorldWrap() -
getBoundary
-
getMinX
public double getMinX() -
getMaxX
public double getMaxX() -
getMinY
public double getMinY() -
getMaxY
public double getMaxY()
-