Description
The ST_Transform
function transforms a given geometry from one coordinate
system to another.
Syntax
ST_Transform(WritableGeometry geometry, String CRS)
Parameters
Parameter |
Type |
Description |
geometry
|
WritableGeometry |
The source input geometry. |
CRS
|
String |
The destination coordinate system for the geometry. |
Return Values
Return Type |
Description |
WritableGeometry |
The geometry transformed to the destination coordinate system. |
Examples
SELECT ST_Transform(ST_GeomFromWKT(t.geometry,'epsg:4326'), 'epsg:3857') FROM table t;
SELECT ST_Transform(ST_POINT(30, 20),'epsg:3857');