Fork me on GitHub

ST_Transform

Signatures

GEOMETRY ST_Transform(GEOMETRY geom, INT srid);

Description

Transforms geom from its original coordinate reference system (CRS) to the CRS specified by srid.

Find the SRID you're looking for.

All available CRS SRIDs may be found by executing SELECT * FROM SPATIAL_REF_SYS; Most SRIDs are EPSG, but the SPATIAL_REF_SYS table may be enriched by other CRSes.

Implements the OpenGIS Simple Features Implementation Specification for SQL version 1.2.1.

Examples

SELECT ST_Transform(ST_GeomFromText(
    'POINT(584173 2594514)', 27572), 4326);
-- Answer: POINT(2.1145411092971056 50.345602339855326)
See also