適用於:
Databricks SQL
Databricks Runtime 17.1 和更新版本
Important
這項功能目前處於 公開預覽版。
備註
這項功能不適用於 Databricks SQL Classic 倉儲。 若要深入瞭解 Databricks SQL 倉儲,請參閱 SQL 倉儲類型。
傳回新的 GEOMETRY 值,其 SRID 是指定的 SRID 值。
Syntax
st_setsrid ( geo, srid )
Arguments
-
geo:一個GEOMETRY值。 -
srid:幾何的新 SRID 值。
Returns
類型的 GEOMETRY值,表示新的幾何值,其 SRID 是指定的 SRID 值。
如果任何輸入為 NULL,則函式會傳NULL回 。
Examples
-- Sets SRID to 3857 and returns the new SRID value.
> SELECT st_srid(st_setsrid(ST_GeomFromText('POINT(4 5)', 4326), 3857));
3857
-- Returns the original geometry with new SRID.
> SELECT st_asewkt(st_setsrid(st_geomfromtext('POINT(1 2)'), 4326));
SRID=4326;POINT(1 2)