ST_TRANSFORM
Converts a GEOMETRY object from one spatial reference system (SRS) to another. If you just need to change the SRID without changing the coordinates (e.g. if the SRID was incorrect), use ST_SETSRID instead.
Syntax
ST_TRANSFORM(<geometry> [, <from_srid>], <to_srid>)
Arguments
Return Type
Geometry.
Examples
SET GEOMETRY_OUTPUT_FORMAT = 'EWKT'
SELECT ST_TRANSFORM(ST_GEOMFROMWKT('POINT(389866.35 5819003.03)', 32633), 3857) AS transformed_geom
┌───────────────────────────────────────────────┐
│ transformed_geom │
├───────────────────────────────────────────────┤
│ SRID=3857;POINT(1489140.093766 6892872.19868) │
└───────────────────────────────────────────────┘
SELECT ST_TRANSFORM(ST_GEOMFROMWKT('POINT(4.500212 52.161170)'), 4326, 28992) AS transformed_geom
┌──────────────────────────────────────────────┐
│ transformed_geom │
├──────────────────────────────────────────────┤
│ SRID=28992;POINT(94308.670475 464038.168827) │
└──────────────────────────────────────────────┘