Aracılığıyla paylaş


st_setsrid fonksiyon

Şunun için geçerlidir:evet olarak işaretlendi Databricks SQL denetimi evet olarak işaretlendi Databricks Runtime 17.1 ve üzeri

Important

Bu özellik Genel Önizleme aşamasındadır.

Uyarı

Bu özellik Databricks SQL Klasik ambarlarında kullanılamaz. Databricks SQL ambarları hakkında daha fazla bilgi edinmek için bkz. SQL ambar türleri.

SRID değeri belirtilen SRID olan yeni GEOGRAPHY veya GEOMETRY değeri döndürür.

Syntax

st_setsrid ( geo, srid )

Arguments

  • geo: Bir GEOGRAPHY veya GEOMETRY değer.
  • srid: Geometrinin yeni SRID değeri.

Returns

Belirtilen SRID değerine sahip yeni bir coğrafya veya geometri değerini temsil eden, GEOGRAPHY veya GEOMETRY türünde bir değer.

Eğer girişlerden herhangi biri NULL ise, işlev NULL döndürür.

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 the new SRID value.
> SELECT st_asewkt(st_setsrid(st_geomfromtext('POINT(1 2)'), 4326));
  SRID=4326;POINT(1 2)

-- Returns the original geography with the new SRID value.
> SELECT st_asewkt(st_setsrid(to_geography('POINT(1 2)'), 4326));
  SRID=4326;POINT(1 2)

-- When invoking st_setsrid with a literal for the SRID value, the output geography type inherits the SRID value.
> SELECT typeof(st_setsrid(to_geography('POINT(1 2)'), 4326));
  geography(4326)

-- When invoking st_setsrid with a literal for the SRID value, the output geometry type inherits the SRID value.
> SELECT typeof(st_setsrid(to_geometry('POINT(1 2)'), 3857));
  geometry(3857)