File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed
docs/cn/sql-reference/20-sql-functions/09-geospatial-functions Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 1- Translation initialization: 2025-10-21T11:32:59.283277
1+ Translation initialization: 2025-10-21T14:23:00.990155
Original file line number Diff line number Diff line change 1+ ---
2+ title : ST_SETSRID
3+ ---
4+ import FunctionDescription from '@site/src /components/FunctionDescription';
5+
6+ <FunctionDescription description =" Introduced or updated: v1.2.566 " />
7+
8+ 返回一个 GEOMETRY(几何对象),其 [ SRID(空间参考系统标识符)] ( https://en.wikipedia.org/wiki/Spatial_reference_system#Identifier ) 被设置为指定值。此函数仅更改 SRID,不影响对象的坐标。如果还需要将坐标转换为新的 SRS(空间参考系统),请改用 [ ST_TRANSFORM] ( st-transform.md ) 。
9+
10+ ## 语法
11+
12+ ``` sql
13+ ST_SETSRID(< geometry> , < srid> )
14+ ```
15+
16+ ## 参数
17+
18+ | 参数 | 说明 |
19+ | --------------| -------------------------------------------------------------|
20+ | ` <geometry> ` | 参数必须是 GEOMETRY(几何对象)类型的表达式。 |
21+ | ` <srid> ` | 要在返回的 GEOMETRY(几何对象)中设置的 SRID 整数值。 |
22+
23+ ## 返回类型
24+
25+ GEOMETRY(几何对象)。
26+
27+ ## 示例
28+
29+ ``` sql
30+ SET GEOMETRY_OUTPUT_FORMAT = ' EWKT'
31+
32+ SELECT ST_SETSRID(TO_GEOMETRY(' POINT(13 51)' ), 4326 ) AS geometry
33+
34+ ┌────────────────────────┐
35+ │ geometry │
36+ ├────────────────────────┤
37+ │ SRID= 4326 ;POINT (13 51 ) │
38+ └────────────────────────┘
39+
40+ ```
You can’t perform that action at this time.
0 commit comments