Description
The ST_ToKML
function returns a text formatted in KML in the OGC standard,
KML2.2 namespace (http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd)
as parsed from the specified WritableGeometry instance.
Syntax
ST_ToKML(WritableGeometry geometry)
Parameters
Parameter | Type | Description |
---|---|---|
geometry | WritableGeometry | The instance of a WritableGeometry. |
Return Values
Return Type | Description |
---|---|
String | The KML representation of a geometry expressed as a hexadecimal encoded string. |
Examples
SELECT ST_ToKML(ST_Buffer(ST_GeomFromGeoJSON(t.geometry), 5.0, 'km', 12, 'SPHERICAL' )) FROM table t;