Package org.apache.iceberg.geospatial
Class BoundingBox
java.lang.Object
org.apache.iceberg.geospatial.BoundingBox
Represents a geospatial bounding box composed of minimum and maximum bounds.
A bounding box (also called a Minimum Bounding Rectangle or MBR) is defined by two points: the minimum and maximum coordinates that define the box's corners. This provides a simple approximation of a more complex geometry for efficient filtering and data skipping.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic BoundingBoxfromByteBuffer(ByteBuffer buffer) Deserialize a byte buffer as aBoundingBoxobjectstatic BoundingBoxfromByteBuffers(ByteBuffer min, ByteBuffer max) Create aBoundingBoxobject from buffers containing min and max boundsinthashCode()max()Get the maximum corner of the bounding box.min()Get the minimum corner of the bounding box.Serializes this bounding box to a byte buffer.toString()
-
Constructor Details
-
BoundingBox
-
-
Method Details
-
fromByteBuffers
Create aBoundingBoxobject from buffers containing min and max bounds- Parameters:
min- the serialized minimum boundmax- the serialized maximum bound- Returns:
- a BoundingBox instance
-
fromByteBuffer
Deserialize a byte buffer as aBoundingBoxobject- Parameters:
buffer- the serialized bounding box- Returns:
- a BoundingBox instance
-
toByteBuffer
Serializes this bounding box to a byte buffer. The serialized byte buffer could be deserialized usingfromByteBuffer(ByteBuffer).- Returns:
- a byte buffer containing the serialized bounding box
-
min
Get the minimum corner of the bounding box.- Returns:
- the minimum bound
-
max
Get the maximum corner of the bounding box.- Returns:
- the maximum bound
-
equals
-
hashCode
public int hashCode() -
toString
-