

 Amazon Redshift non supporterà più la creazione di nuovi Python UDFs a partire dalla Patch 198. Python esistente UDFs continuerà a funzionare fino al 30 giugno 2026. Per ulteriori informazioni, consulta il [post del blog](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

# ST\$1 GeometryType
<a name="ST_GeometryType-function"></a>

ST\$1 GeometryType restituisce il sottotipo di una geometria di input come stringa. 

Per gli input geometrici 3DM, 3DZ e 4D, GeometryType ST\$1 restituisce lo stesso risultato degli input geometrici 2D.

## Sintassi
<a name="ST_GeometryType-function-syntax"></a>

```
ST_GeometryType(geom)
```

## Arguments (Argomenti)
<a name="ST_GeometryType-function-arguments"></a>

 *geom*   
Un valore di tipo `GEOMETRY` o un'espressione che restituisce un valore di tipo `GEOMETRY`. 

## Tipo restituito
<a name="ST_GeometryType-function-return"></a>

`VARCHAR` che rappresenta il sottotipo di *geom*. 

Se *geom* è nullo, allora viene restituito il valore nullo. 

I valori restituiti sono i seguenti.


| Valore stringa restituito | Sottotipo dato di tipo geometry | 
| --- | --- | 
| `ST_Point` | Restituito se *geom* è di sottotipo `POINT`  | 
| `ST_LineString` | Restituito se *geom* è di sottotipo `LINESTRING`  | 
| `ST_Polygon` | Restituito se *geom* è di sottotipo `POLYGON`  | 
| `ST_MultiPoint` | Restituito se *geom* è di sottotipo `MULTIPOINT`  | 
| `ST_MultiLineString` | Restituito se *geom* è di sottotipo `MULTILINESTRING`  | 
| `ST_MultiPolygon` | Restituito se *geom* è di sottotipo `MULTIPOLYGON`  | 
| `ST_GeometryCollection` | Restituito se *geom* è di sottotipo `GEOMETRYCOLLECTION`  | 

## Esempi
<a name="ST_GeometryType-function-examples"></a>

Il seguente comando SQL restituisce il sottotipo dell'oggetto geometrico linestring in input. 

```
SELECT ST_GeometryType(ST_GeomFromText('LINESTRING(77.29 29.07,77.42 29.26,77.27 29.31,77.29 29.07)'));
```

```
st_geometrytype
-------------
 ST_LineString
```