Skip to content

Box3D predicates: ST_3DBoxIntersects and ST_3DBoxContains #3012

@jiayuasu

Description

@jiayuasu

Follow-up to the Box3D Phase 1 epic (#2973). Adds the two Box3D-on-Box3D spatial predicates.

Scope

  • ST_3DBoxIntersects(box3d, box3d) -> boolean — closed-interval intersection on all three axes. Matches PostGIS's &&& 3D overlap operator.
  • ST_3DBoxContains(box3d, box3d) -> boolean — closed-interval containment on all three axes. Matches PostGIS's ~~ on box3d.

Semantics

  • Closed-interval — edge/face/corner contact counts as intersecting and contained. Parallel to the Box2D contract on ST_BoxIntersects / ST_BoxContains.
  • Inverted bounds (xmin > xmax, ymin > ymax, zmin > zmax) are rejected with IllegalArgumentException. Z does not wraparound, so we do not carry forward Box2D's "reserved for future antimeridian wraparound" exception.
  • NULL input → NULL result (no in-band empty marker).

Out of scope

  • Spatial join planner integration (separate follow-up — see EPIC).
  • Filter pushdown for Box3D predicates against Box3D columns.
  • ST_3DDWithin distance predicate (separate follow-up).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions