跳转至
Apache Sedona 1.9.0 已正式发布,新增 Spark 4.1 支持、proj4sedona 坐标系转换、Bing Tile 函数等众多特性!

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.