st_makepoint Funzione

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

Note

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

Restituisce un valore di punto GEOMETRY con le coordinate indicate. La funzione accetta 2, 3 o 4 DOUBLE valori, che rappresentano le coordinate (x, y), (x, y, z) o (x, y, z, m) del punto.

Syntax

st_makepoint ( x, y [, z [, m ] ] )

Arguments

  • x: Un valore, che DOUBLE rappresenta la prima coordinata del punto.
  • y: Un DOUBLE valore, che rappresenta la seconda coordinata del punto.
  • z: Un valore opzionale DOUBLE , che rappresenta la terza coordinata (Z) del punto.
  • m: Un valore opzionale DOUBLE , che rappresenta la quarta coordinata (M) del punto.

Returns

Valore di tipo GEOMETRY, che rappresenta un punto con le coordinate specificate.

Il valore SRID della geometria restituita è sempre 0.

Il numero di coordinate di input determina la dimensione del punto restituito: 2D se si specifica solo x e y, 3DZ se si specifica anche , o 4D se si specificano ztutte e quattro le coordinate (x, y, ze m).

La funzione restituisce NULL se uno degli input è NULL.

Examples

-- Creates a 2D point with coordinates (10, 34).
> SELECT st_astext(st_makepoint(10.0, 34.0));
  POINT(10 34)
-- Creates a 3DZ point with coordinates (1, 2, 3).
> SELECT st_astext(st_makepoint(1.0, 2.0, 3.0));
  POINT Z (1 2 3)
-- Creates a 4D point with coordinates (1, 2, 3, 4).
> SELECT st_astext(st_makepoint(1.0, 2.0, 3.0, 4.0));
  POINT ZM (1 2 3 4)

-- The SRID of the returned geometry is always 0.
> SELECT st_srid(st_makepoint(10.0, 34.0));
  0
-- The type of the returned geometry is always geometry(0).
> SELECT typeof(st_makepoint(10.0, 34.0));
  geometry(0)

-- The function returns NULL if any of the inputs is NULL.
> SELECT st_astext(st_makepoint(10.0, NULL));
  NULL