Skip to content

Python bindings for Box2D scalar functions and ST_Extent #2887

@jiayuasu

Description

@jiayuasu

Sub-task of #2877.

Scope

Mirror the Phase 1 SQL surface in PySpark wrappers:

  • ST_Box2D(geom) in python/sedona/spark/sql/st_functions.py
  • ST_MakeBox2D(p1, p2) in python/sedona/spark/sql/st_functions.py
  • ST_Extent(geom) in python/sedona/spark/sql/st_aggregates.py
  • Accessor overloads (ST_XMin/XMax/YMin/YMax(box)) — these wrappers already exist for Geometry; verify they pass Box2D arguments through cleanly.
  • ST_AsText(box) — same as above.

The Python Box2DType UDT and Box2D value class are already merged in #2878.

Implementation

  • Each function uses the existing _call_st_function helper to dispatch to the JVM-side function.
  • Imports of Box2DType / Box2D for users who want to construct or assert on bbox columns.
  • Python tests: each function on small DataFrames, NULL propagation, schema check that bbox columns surface as Box2DType.

Depends on

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