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

Costruisce un valore poligono GEOMETRY dal limite esterno di input e dalla matrice facoltativa di limiti interni, rappresentati come stringhe di riga chiuse.

Syntax

st_makepolygon ( outer[, innerArray] )

Arguments

  • outer: Un GEOMETRY valore.
  • innerArray: Un array di GEOMETRY valori.

Returns

Valore di tipo GEOMETRY, che rappresenta un poligono.

Tutti NULL i valori nella matrice di limiti interni vengono ignorati.

Il valore SRID del poligono di output è il valore SRID comune delle geometrie di input.

La dimensione del poligono di output è la dimensione massima comune delle stringhe di input.

La funzione restituisce NULL se uno degli input è NULL.

Condizioni di errore

Examples

-- Returns a polygon constructed from the outer boundary.
> SELECT st_astext(st_makepolygon(st_geomfromtext('LINESTRING(0 0,10 0,10 10,0 10,0 0)')));
  POLYGON((0 0,10 0,10 10,0 10,0 0))
-- Returns a polygon constructed from the outer boundary and an inner boundary.
> SELECT st_astext(st_makepolygon(st_geomfromtext('LINESTRING(0 0,10 0,10 10,0 10,0 0)'), array(st_geomfromtext('LINESTRING(1 1,2 1,1 2,1 1)'))));
  POLYGON((0 0,10 0,10 10,0 10,0 0),(1 1,2 1,1 2,1 1))