st_scale 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.

Ridimensiona il valore di input GEOMETRY nelle direzioni X, Y e, se specificato, Z usando i fattori di ridimensionamento forniti.

Syntax

st_scale ( geoExpr, xfactor, yfactor[, zfactor] )

Arguments

  • geoExpr: Un GEOMETRY valore.
  • xfactor: Un valore che DOUBLE rappresenta il fattore di scala X.
  • yfactor: Un valore che DOUBLE rappresenta il fattore di scala Y.
  • zfactor: Un DOUBLE valore che rappresenta il fattore di scala Z (opzionale). Il valore predefinito è 1.

Returns

Valore di tipo GEOMETRY, che rappresenta la geometria scalata.

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

La dimensione del valore di output GEOMETRY è uguale a quella del valore di input.

La funzione restituisce NULL se uno degli input è NULL.

Examples

-- Scales a point by 10 in the X direction and 20 in the Y direction.
> SELECT st_astext(st_scale(st_geomfromtext('MULTIPOINT ZM (1 2 3 -4,5 6 7 -8,EMPTY)'), 10.0, 20.0));
  MULTIPOINT ZM ((10 40 3 -4),(50 120 7 -8),EMPTY)
-- Scales a point by 10 in the X direction, 20 in the Y direction, and 3 in the Z direction.
> SELECT st_astext(st_scale(st_geomfromtext('MULTIPOINT ZM (1 2 3 -4,5 6 7 -8,EMPTY)'), 10.0, 20.0, 3.0));
  MULTIPOINT ZM ((10 40 9 -4),(50 120 21 -8),EMPTY)