Skip to content
Apache Sedona 1.9.0 is out now, featuring Spark 4.1 support, proj4sedona CRS transformation, Bing Tile functions, and more!

ST_AsGML

Introduction: Return the GML string representation of a geometry

Format: ST_AsGML (A: Geometry)

Return type: String

Since: v1.3.0

SQL Example

SELECT ST_AsGML(ST_GeomFromWKT('POLYGON((1 1, 8 1, 8 8, 1 8, 1 1))'))

Output:

1.0,1.0 8.0,1.0 8.0,8.0 1.0,8.0 1.0,1.0