st_flipcoordinates Funzione

Si applica a:spuntato sì Databricks SQL contrassegnato sì Databricks Runtime 17.1 e superiori spuntati spuntati sì Lakehouse//RT

Annotazioni

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

Scambia le coordinate X e Y del valore di input GEOMETRY .

Syntax

st_flipcoordinates ( geoExpr )

Arguments

  • geoExpr: Un GEOMETRY valore.

Returns

Valore di tipo GEOMETRY con coordinate X e Y scambiate.

Il valore SRID del valore di output GEOMETRY è uguale a quello del valore di input.

La funzione restituisce NULL se l'input è NULL.

Examples

-- Swaps X and Y coordinates of a linestring.
> SELECT st_astext(st_flipcoordinates(st_geomfromtext('LINESTRING(1 2,3 4,5 6,7 8)')));
  LINESTRING(2 1,4 3,6 5,8 7)
-- Swaps X and Y coordinates of a point.
> SELECT st_astext(st_flipcoordinates(st_geomfromtext('POINT(10 20)')));
  POINT(20 10)