ST_TRANSFORM

functionsupportedCore SQL functions

docs.snowflake.com ↗

Geospatial functions

Converts a GEOMETRY object from one spatial reference system (SRS) to another. Use this function to change the SRID and the coordinates of the object to match the new SRS (spatial reference system). If you just need to change the SRID without changing the coordinates (e.g. if the SRID was incorrect), use ST_SETSRID instead.

Syntax

supportedpartialnot supportednot scored

ST_TRANSFORM( <geometry_expression> [ , <from_srid> ] , <to_srid> );

Parameters

NameRequiredDescription
geometry_expressionrequiredThe argument must be of type GEOMETRY.
to_sridrequiredThe spatial reference system identifier (SRID) that identifies the SRS to use. The function transforms the input GEOMETRY object to a new object that uses this SRS.
from_sridoptionalThe SRID identifying the current SRS of the input GEOMETRY object. If this argument is omitted, the function uses the SRID specified in the input GEOMETRY object.

Returns

The function returns a GEOMETRY object that uses the SRS identified by to_srid.

Usage notes