ST_Transform

Transform a geometry into one that uses a different spatial reference system.

Syntax

ST_Transform(geo, srid);
geo
The first input geometry.

Type: ST_GEOMETRY(ANY)

srid
The identifier of the new spatial reference system.

Type: INT4

Returns

A value of type ST_GEOMETRY(ANY) containing a new geometry based on the input geometry, but that uses the specified spatial reference system.

Examples

SELECT inza..ST_AsText(inza..ST_Transform(inza..ST_WKTToSQL('POLYGON ((10 10, 10 20, 20 20, 20 15, 10 10))'), 27700));

ST_ASTEXT
---------
POLYGON ((1724412.4316 -4397861.1924, 2817375.6518
-3744702.2482, 2745912.5732 -3156572.3234, 1662480.6089
-3270453.2226, 1724412.4316 -4397861.1924))
(1 row)