STGeometryType (tipo di dati geography)
Restituisce il nome del tipo OGC (Open Geospatial Consortium) rappresentato da un'istanza geography.
Sintassi
.STGeometryType ( )
Tipi restituiti
SQL Server tipo restituito: nvarchar(4000)
Tipo CLR restituito: SqlString
Osservazioni
I nomi dei tipi OGC che possono essere restituiti da STGeometryType() sono Point, LineString, CircularString, CompoundCurve, Polygon, CurvePolygon, GeometryCollection, MultiPoint, MultiLineString e MultiPolygon.
Esempi
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((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
SELECT @g.STGeometryType();