Skip to content

[GH-3048] Docs: Box3D SQL reference pages with isometric diagrams#3049

Merged
jiayuasu merged 1 commit into
apache:masterfrom
jiayuasu:docs/box3d-reference
Jun 12, 2026
Merged

[GH-3048] Docs: Box3D SQL reference pages with isometric diagrams#3049
jiayuasu merged 1 commit into
apache:masterfrom
jiayuasu:docs/box3d-reference

Conversation

@jiayuasu

Copy link
Copy Markdown
Member

Did you read the Contributor Guide?

  • Yes

Is this PR related to a ticket?

  • Yes — closes #3048; the documentation deliverable of the Box3D EPIC (#2973).

What changes were proposed in this PR?

The Box3D SQL surface is fully shipped across Spark (Scala + Python) and Flink, but had no reference documentation. This adds it, mirroring the Box2D doc structure, plus a set of isometric SVG diagrams — 3D bbox semantics are much harder to grasp from prose alone than 2D.

Pages:

  • box3d/Box3D-Functions.md landing page (semantic notes; constructor / accessor / predicate / function / aggregate tables; type conversion; query optimization). Added to the SQL nav and the Chinese nav_translations.
  • Constructors: ST_Box3D, ST_3DMakeBox.
  • Accessors: ST_XMin / ST_YMin / ST_ZMin / ST_XMax / ST_YMax / ST_ZMax.
  • Function: ST_AsText(box3d).
  • Aggregate: Aggregate-Functions/ST_3DExtent.md.
  • Predicate: Predicates/ST_3DDWithin.md. The ST_Intersects / ST_Contains Box3D overloads are documented on those shared pages, which also get Box3D true/false figures.
  • Index rows for ST_3DExtent / ST_3DDWithin added to Geometry-Functions.md.

Diagrams (docs/image/box3d/, generated with a consistent isometric axonometric projection so every cuboid is geometrically exact):

  • box3d_anatomy, st_box3d, st_3dmakebox, st_3dextent.
  • st_intersects_box3d_{true,false}, st_contains_box3d_{true,false}, st_3ddwithin_{true,false}. The false cases deliberately depict the XY-footprints-overlap-but-Z-ranges-disjoint scenario — the key 3D distinction a 2D bbox diagram cannot convey.

The docs describe what ships today and note that Box3D filter pushdown and the inverse CAST(box3d AS geometry) are not yet implemented.

How was this patch tested?

  • All 10 embedded image references and all cross-page links verified to resolve.
  • markdownlint / yamllint pre-commit hooks pass.
  • SVGs render correctly via rsvg-convert (spot-checked the anatomy, intersects, contains, and extent figures).

Did this PR include necessary documentation updates?

  • This PR is the documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds missing SQL reference documentation for Sedona’s Box3D type (Spark + Flink), mirroring the existing Box2D doc structure and augmenting predicate/aggregate pages with new isometric SVG diagrams to clarify 3D bounding-box semantics.

Changes:

  • Adds a new Box3D SQL docs section (landing page + constructor/accessor/function references) and wires it into the MkDocs navigation (including Chinese nav translations).
  • Documents Box3D-specific semantics for shared predicates (ST_Intersects, ST_Contains), adds a dedicated ST_3DDWithin predicate page, and documents ST_3DExtent.
  • Adds a set of Box3D isometric SVG diagrams used across the new/updated docs pages.

Reviewed changes

Copilot reviewed 16 out of 26 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
mkdocs.yml Adds Box3D landing page to SQL nav + i18n nav translation.
docs/api/sql/Geometry-Functions.md Adds index-table entries for ST_3DDWithin and ST_3DExtent.
docs/api/sql/Predicates/ST_Intersects.md Documents Box3D overload semantics with true/false figures.
docs/api/sql/Predicates/ST_Contains.md Documents Box3D overload semantics with true/false figures.
docs/api/sql/Predicates/ST_3DDWithin.md New reference page for the 3D distance predicate, including optimization notes and figures.
docs/api/sql/Aggregate-Functions/ST_3DExtent.md New reference page for the Box3D extent aggregate, including figure and example.
docs/api/sql/box3d/Box3D-Functions.md New Box3D landing page (semantics, tables, type conversion, optimization).
docs/api/sql/box3d/Box3D-Functions/ST_AsText.md Documents ST_AsText(box3d) overload and output format.
docs/api/sql/box3d/Box3D-Constructors/ST_Box3D.md Documents ST_Box3D constructor and behavior for XY-only geometries.
docs/api/sql/box3d/Box3D-Constructors/ST_3DMakeBox.md Documents ST_3DMakeBox constructor with example and error behavior.
docs/api/sql/box3d/Box3D-Accessors/ST_XMin.md New Box3D accessor reference for ST_XMin(box3d).
docs/api/sql/box3d/Box3D-Accessors/ST_YMin.md New Box3D accessor reference for ST_YMin(box3d).
docs/api/sql/box3d/Box3D-Accessors/ST_ZMin.md New Box3D accessor reference for ST_ZMin(box3d).
docs/api/sql/box3d/Box3D-Accessors/ST_XMax.md New Box3D accessor reference for ST_XMax(box3d).
docs/api/sql/box3d/Box3D-Accessors/ST_YMax.md New Box3D accessor reference for ST_YMax(box3d).
docs/api/sql/box3d/Box3D-Accessors/ST_ZMax.md New Box3D accessor reference for ST_ZMax(box3d).
docs/image/box3d/box3d_anatomy.svg New Box3D anatomy diagram.
docs/image/box3d/st_box3d.svg New diagram for ST_Box3D.
docs/image/box3d/st_3dmakebox.svg New diagram for ST_3DMakeBox.
docs/image/box3d/st_3dextent.svg New diagram for ST_3DExtent.
docs/image/box3d/st_intersects_box3d_true.svg New Box3D ST_Intersects true-case diagram.
docs/image/box3d/st_intersects_box3d_false.svg New Box3D ST_Intersects false-case (Z-disjoint) diagram.
docs/image/box3d/st_contains_box3d_true.svg New Box3D ST_Contains true-case diagram.
docs/image/box3d/st_contains_box3d_false.svg New Box3D ST_Contains false-case (Z overflow) diagram.
docs/image/box3d/st_3ddwithin_true.svg New Box3D ST_3DDWithin true-case diagram.
docs/image/box3d/st_3ddwithin_false.svg New Box3D ST_3DDWithin false-case diagram.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


![ST_3DMakeBox builds a cuboid from two corner POINT Z geometries](../../../../image/box3d/st_3dmakebox.svg "ST_3DMakeBox: cuboid from two corner points")

Format: `ST_3DMakeBox(pointLowLeft: Geometry, pointUpRight: Geometry)`

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in latest push: signature is now ST_3DMakeBox(lowerLeft: Point, upperRight: Point), matching the actual contract (throws IllegalArgumentException on non-POINT input) and the ST_MakeBox2D doc. The page body already noted the POINT requirement and the missing-Z-folds-to-0 behavior.

The Box3D SQL surface is fully shipped across Spark and Flink but had no
reference docs. Adds them, mirroring the Box2D doc structure, plus a set
of isometric SVG diagrams (3D is harder to grasp from prose than 2D).

Pages:
- box3d/Box3D-Functions.md landing page (added to SQL nav + Chinese
  nav_translations).
- Constructors: ST_Box3D, ST_3DMakeBox.
- Accessors: ST_XMin / ST_YMin / ST_ZMin / ST_XMax / ST_YMax / ST_ZMax.
- Function: ST_AsText(box3d).
- Aggregate: Aggregate-Functions/ST_3DExtent.md.
- Predicate: Predicates/ST_3DDWithin.md; Box3D true/false figures also
  added to the shared ST_Intersects / ST_Contains pages.
- Index rows for ST_3DExtent / ST_3DDWithin in Geometry-Functions.md.

Diagrams (docs/image/box3d/, isometric axonometric projection):
- box3d_anatomy, st_box3d, st_3dmakebox, st_3dextent.
- st_intersects_box3d_{true,false}, st_contains_box3d_{true,false},
  st_3ddwithin_{true,false}. The false cases deliberately show the
  XY-overlap-but-Z-disjoint scenario — the key 3D distinction that a
  2D bbox diagram cannot convey.

Notes that Box3D filter pushdown and the inverse CAST(box3d AS geometry)
are not yet implemented.
@jiayuasu jiayuasu force-pushed the docs/box3d-reference branch from a6152b5 to bab3432 Compare June 12, 2026 06:31
@jiayuasu jiayuasu added this to the sedona-1.9.1 milestone Jun 12, 2026
@jiayuasu jiayuasu linked an issue Jun 12, 2026 that may be closed by this pull request
@jiayuasu jiayuasu merged commit f129b35 into apache:master Jun 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Box3D SQL reference pages

2 participants