49 double x()
const {
return x_; }
51 double y()
const {
return y_; }
53 const std::optional<double>&
z()
const {
return z_; }
55 const std::optional<double>&
m()
const {
return m_; }
65 GeospatialBound(
double x,
double y, std::optional<double> z, std::optional<double> m);
69 std::optional<double> z_;
70 std::optional<double> m_;
86 std::span<const uint8_t> upper);
A pair of lower and upper geospatial column bounds.
Definition geospatial.h:74
static Result< BoundingBox > Deserialize(std::span< const uint8_t > lower, std::span< const uint8_t > upper)
Decode a bounding box from separate lower and upper encodings.
const GeospatialBound & lower() const
Return the lower bound.
Definition geospatial.h:80
const GeospatialBound & upper() const
Return the upper bound.
Definition geospatial.h:82
BoundingBox(GeospatialBound lower, GeospatialBound upper)
Create a bounding box from lower and upper bounds.
static Result< BoundingBox > Deserialize(std::span< const uint8_t > bytes)
Decode a bounding box from Iceberg's combined encoding.
std::vector< uint8_t > Serialize() const
Encode this bounding box using Iceberg's combined encoding.
A point used as a lower or upper geospatial column bound.
Definition geospatial.h:37
double y() const
Return the Y coordinate.
Definition geospatial.h:51
double x() const
Return the X coordinate.
Definition geospatial.h:49
static GeospatialBound XYZM(double x, double y, double z, double m)
Create a bound with Z and M coordinates.
static GeospatialBound XYM(double x, double y, double m)
Create a bound with an M coordinate.
const std::optional< double > & z() const
Return the optional Z coordinate.
Definition geospatial.h:53
static GeospatialBound XY(double x, double y)
Create a two-dimensional bound.
static GeospatialBound XYZ(double x, double y, double z)
Create a bound with a Z coordinate.
std::vector< uint8_t > Serialize() const
Encode this bound using little-endian encoding.
const std::optional< double > & m() const
Return the optional M coordinate.
Definition geospatial.h:55
static Result< GeospatialBound > Deserialize(std::span< const uint8_t > bytes)
Decode a little-endian geospatial bound.
Interface for a data type for a field.
Definition type.h:44
Define symbol visibility macros for core Iceberg APIs.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:33
std::expected< T, E > Result
Result alias.
Definition result.h:88
ICEBERG_EXPORT Result< bool > GeospatialBoundsIntersect(const Type &type, const BoundingBox &lhs, const BoundingBox &rhs)
Check whether two bounding boxes intersect for an Iceberg geospatial type.
Define Result, Status, and error helpers.