Condividi tramite


STGeometryType (tipo di dati geometry)

Si applica a:SQL ServerAzure SQL DatabaseAzure SQL Istanza gestitaDatabase SQL in Microsoft Fabric

Restituisce il nome del tipo OGC (Open Geospatial Consortium) rappresentato da un'istanza geometry.

Syntax

  
.STGeometryType ( )  

Tipi restituiti

Tipo SQL Server restituito: nvarchar(4000)

Tipo CLR restituito: SqlString

Remarks

I nomi dei tipi OGC che possono essere restituiti da STGeometryType() sono Point, LineString, CircularString, CompoundCurve, Polygon, CurvePolygon, GeometryCollection, MultiPoint, MultiLineString e MultiPolygon.

Examples

Nell'esempio seguente viene creata un'istanza Polygon e viene utilizzato STGeometryType() per confermare che si tratta di un poligono.

DECLARE @g geometry;  
SET @g = geometry::STGeomFromText('POLYGON((0 0, 3 0, 3 3, 0 3, 0 0))', 0);  
SELECT @g.STGeometryType();  

Vedere anche

Metodi OGC sulle istanze di geometria