Sub-task of #2877.
Scope
Add the ST_MakeBox2D(lower_left: Point, upper_right: Point) -> Box2D scalar constructor. Direct PostGIS counterpart.
Returns a Box2D from two opposing corner points. NULL propagates from either input.
Implementation
- New
ST_MakeBox2D case class in spark/common/.../expressions/Constructors.scala.
- Backing helper in
common/.../Functions.java (or a new Box2DConstructors.java) that builds a Box2D from two Point instances.
- Catalog registration.
- Tests: ordered corners, swapped corners (xmin > xmax should remain — this is the antimeridian-reserved space, NOT empty; document the user contract), 3D point input, null propagation.
Out of scope
ST_3DMakeBox (waits for Box3D).
Sub-task of #2877.
Scope
Add the
ST_MakeBox2D(lower_left: Point, upper_right: Point) -> Box2Dscalar constructor. Direct PostGIS counterpart.Returns a
Box2Dfrom two opposing corner points. NULL propagates from either input.Implementation
ST_MakeBox2Dcase class inspark/common/.../expressions/Constructors.scala.common/.../Functions.java(or a newBox2DConstructors.java) that builds aBox2Dfrom twoPointinstances.Out of scope
ST_3DMakeBox(waits forBox3D).