Condividi tramite


Funzione st_setsrid

Si applica a:check contrassegnato come sì controllo SQL di Databricks contrassegnato come sì Databricks Runtime 17.1 e versioni successive

Important

Questa funzionalità è in Anteprima Pubblica.

Annotazioni

Questa funzionalità non è disponibile in Databricks SQL Classic Warehouses. Per altre informazioni sui databricks SQL Warehouse, vedere Tipi di SQL Warehouse.

Restituisce un nuovo GEOMETRY valore il cui SRID è il valore SRID specificato.

Syntax

st_setsrid ( geo, srid )

Arguments

  • geo: un valore GEOMETRY.
  • srid: nuovo valore SRID della geometria.

Returns

Valore di tipo GEOMETRY, che rappresenta un nuovo valore geometrico il cui SRID è quello specificato.

La funzione restituisce NULL se uno degli input è 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)