Class BoundingBox
java.lang.Object
org.apache.parquet.column.statistics.geospatial.BoundingBox
-
Constructor Summary
ConstructorsConstructorDescriptionBoundingBox(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax, double mMin, double mMax) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Aborts the bounding box by resetting it to its initial state.copy()Creates a copy of the current bounding box.doublegetMMax()doublegetMMin()doublegetXMax()doublegetXMin()doublegetYMax()doublegetYMin()doublegetZMax()doublegetZMin()booleanisMEmpty()Checks if the bounding box is empty in the M dimension.booleanisMValid()Checks if the M dimension of the bounding box is valid.booleanisValid()Checks if the bounding box is valid.static booleanisWraparound(double xmin, double xmax) The Parquet specification allows X bounds to be "wraparound" to allow for more compact bounding boxes when a geometry happens to include components on both sides of the antimeridian (e.g., the nation of Fiji).booleanisXEmpty()Checks if the bounding box is empty in the X dimension.booleanisXValid()Checks if the X dimension of the bounding box is valid.booleanChecks if the X dimension of this bounding box wraps around the antimeridian.booleanChecks if the bounding box is empty in the X / Y dimension.booleanChecks if the X and Y dimensions of the bounding box are valid.booleanisYEmpty()Checks if the bounding box is empty in the Y dimension.booleanisYValid()Checks if the Y dimension of the bounding box is valid.booleanisZEmpty()Checks if the bounding box is empty in the Z dimension.booleanisZValid()Checks if the Z dimension of the bounding box is valid.voidmerge(BoundingBox other) Expands this bounding box to include the bounds of another box.voidreset()Resets the bounding box to its initial state.toString()voidupdate(org.locationtech.jts.geom.Geometry geometry) Extends this bounding box to include the spatial extent of the provided geometry.
-
Constructor Details
-
BoundingBox
public BoundingBox() -
BoundingBox
public BoundingBox(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax, double mMin, double mMax)
-
-
Method Details
-
getXMin
public double getXMin() -
getXMax
public double getXMax() -
getYMin
public double getYMin() -
getYMax
public double getYMax() -
getZMin
public double getZMin() -
getZMax
public double getZMax() -
getMMin
public double getMMin() -
getMMax
public double getMMax() -
isValid
public boolean isValid()Checks if the bounding box is valid. A bounding box is considered valid if none of the X / Y dimensions contain NaN.- Returns:
- true if the bounding box is valid, false otherwise.
-
isXYValid
public boolean isXYValid()Checks if the X and Y dimensions of the bounding box are valid. The X and Y dimensions are considered valid if none of the bounds contain NaN.- Returns:
- true if the X and Y dimensions are valid, false otherwise.
-
isXValid
public boolean isXValid()Checks if the X dimension of the bounding box is valid. The X dimension is considered valid if neither bound contains NaN.- Returns:
- true if the X dimension is valid, false otherwise.
-
isYValid
public boolean isYValid()Checks if the Y dimension of the bounding box is valid. The Y dimension is considered valid if neither bound contains NaN.- Returns:
- true if the Y dimension is valid, false otherwise.
-
isZValid
public boolean isZValid()Checks if the Z dimension of the bounding box is valid. The Z dimension is considered valid if none of the bounds contain NaN.- Returns:
- true if the Z dimension is valid, false otherwise.
-
isMValid
public boolean isMValid()Checks if the M dimension of the bounding box is valid. The M dimension is considered valid if none of the bounds contain NaN.- Returns:
- true if the M dimension is valid, false otherwise.
-
isXYEmpty
public boolean isXYEmpty()Checks if the bounding box is empty in the X / Y dimension.- Returns:
- true if the bounding box is empty, false otherwise.
-
isXEmpty
public boolean isXEmpty()Checks if the bounding box is empty in the X dimension.- Returns:
- true if the X dimension is empty, false otherwise.
-
isYEmpty
public boolean isYEmpty()Checks if the bounding box is empty in the Y dimension.- Returns:
- true if the Y dimension is empty, false otherwise.
-
isZEmpty
public boolean isZEmpty()Checks if the bounding box is empty in the Z dimension.- Returns:
- true if the Z dimension is empty, false otherwise.
-
isMEmpty
public boolean isMEmpty()Checks if the bounding box is empty in the M dimension.- Returns:
- true if the M dimension is empty, false otherwise.
-
isXWraparound
public boolean isXWraparound()Checks if the X dimension of this bounding box wraps around the antimeridian. This occurs when the minimum X value is greater than the maximum X value, which is allowed by the Parquet specification for geometries that cross the antimeridian.- Returns:
- true if the X dimension wraps around, false otherwise.
-
merge
Expands this bounding box to include the bounds of another box. After merging, this bounding box will contain both its original extent and the extent of the other bounding box. If either this bounding box or the other has wraparound X coordinates, the X dimension will be marked as invalid (set to NaN) in the result.- Parameters:
other- the other BoundingBox whose bounds will be merged into this one
-
update
public void update(org.locationtech.jts.geom.Geometry geometry) Extends this bounding box to include the spatial extent of the provided geometry. The bounding box coordinates (min/max values for x, y, z, m) will be adjusted to encompass both the current bounds and the geometry's bounds.- Parameters:
geometry- The geometry whose coordinates will be used to update this bounding box. If null or empty, the method returns without making any changes.
-
abort
public void abort()Aborts the bounding box by resetting it to its initial state. -
reset
public void reset()Resets the bounding box to its initial state. -
isWraparound
public static boolean isWraparound(double xmin, double xmax) The Parquet specification allows X bounds to be "wraparound" to allow for more compact bounding boxes when a geometry happens to include components on both sides of the antimeridian (e.g., the nation of Fiji). This function checks for that case. -
copy
Creates a copy of the current bounding box.- Returns:
- a new BoundingBox instance with the same values as this one.
-
toString
-