全部產品
Search
文件中心

ApsaraDB RDS:ST_Transform

更新時間:Feb 28, 2024

將軌跡從一個空間參考系轉換到另一個空間參考系。

文法

trajectory ST_Transform(trajectory traj, int srid);

參數

參數名稱描述
traj需要轉換的軌跡對象。
srid目標空間參考系的SRID。
說明 原軌跡對象必須有SRID屬性才能被轉換到另一個空間參考系。

樣本

select ST_Transform('{"trajectory":{"version":1,"type":"STPOINT","leafcount":4,"start_time":"2020-11-03 08:00:00","end_time":"2020-11-03 18:03:20","spatial":"SRID=4326;LINESTRING(114.49211 37.97999,114.49211 37.97521,114.49191 37.98021,124 37)","timeline":["2020-11-03 08:00:00","2020-11-03 08:01:40","2020-11-03 08:03:20","2020-11-03 18:03:20"]}}'::trajectory, 2401);
                                                                                                                                                                                     st_transform                                                                                                                                                                                      
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 {"trajectory":{"version":1,"type":"STPOINT","leafcount":4,"start_time":"2020-11-03 08:00:00","end_time":"2020-11-03 18:03:20","spatial":"SRID=2401;LINESTRING(29019418.8397 5025539.47515,29019696.5878 5024992.53808,29019387.9428 5025555.44863,29954166.377 5430882.06455)","timeline":["2020-11-03 08:00:00","2020-11-03 08:01:40","2020-11-03 08:03:20","2020-11-03 18:03:20"]}}
(1 row)