The ST_EnvelopeAsGML() function
The ST_EnvelopeAsGML() function takes a geometry value returned by ST_Envelope and generates a GML3 Envelope element.
Syntax
ST_EnvelopeAsGML(p ST_Geometry)
Return type
ST_Geometry
Example
ST_EnvelopeFromGML(ST_Envelope(ST_LineFromText('LINESTRING(1 2, 3 4)', 1003)))
Output:
<gml:Envelope srsName="EPSG:1234">
<gml:lowerCorner> 1 2</gml:lowerCorner>
<gml:upperCorner> 3 4 </gml:upperCorner>
</gml:Envelope>