📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ST_SETSRID



Returns a GEOMETRY object that has its SRID (spatial reference system identifier) set to the specified value. This Function only change the SRID without affecting the coordinates of the object. If you also need to change the coordinates to match the new SRS (spatial reference system), use ST_TRANSFORM instead.

Syntax

ST_SETSRID(<geometry>, <srid>)

Arguments

ArgumentsDescription
<geometry>The argument must be an expression of type GEOMETRY object.
<srid>The SRID integer to set in the returned GEOMETRY object.

Return Type

Geometry.

Examples

SET GEOMETRY_OUTPUT_FORMAT = 'EWKT' SELECT ST_SETSRID(TO_GEOMETRY('POINT(13 51)'), 4326) AS geometry ┌────────────────────────┐ │ geometry │ ├────────────────────────┤ │ SRID=4326;POINT(13 51) │ └────────────────────────┘

Was this page helpful?