ST_AsText¶
Introduction: Return the BOX(xmin ymin, xmax ymax) text representation of a Box2D value. The format matches PostGIS's text representation of the box2d type and is intended for display and round-tripping with PostGIS-compatible tooling — not as a parseable round-trip into Sedona (use ST_MakeBox2D for that).
This is the Box2D overload of ST_AsText; the Geometry variant emits standard WKT.
Format: ST_AsText(box: Box2D)
Return type: String
Since: v1.9.1
SQL Example
SELECT ST_AsText(ST_MakeBox2D(ST_Point(0.0, 0.0), ST_Point(10.0, 20.0)))
Output:
BOX(0.0 0.0, 10.0 20.0)
Returns NULL on NULL input.