跳到主要内容

ST_SETSRID

Introduced or updated: v1.2.566

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)
└────────────────────────┘

开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册