STIsRing (tipo di dati geometry)

Si applica a:SQL Server database SQL di Azure Istanza gestita di SQL di Azure Endpoint di analisiSQL in Microsoft FabricWarehouse in Microsoft Fabric

Restituisce 1 se un'istanza geometry soddisfa i requisiti seguenti:

  • Si tratta di un'istanza LineString.
  • È chiusa.
  • È semplice.
  • Restituisce 0 se l'istanza LineString non soddisfa i requisiti.

Affinché un'istanza geometry sia chiusa e semplice, sia STIsClosed() che STIsSimple() devono restituire 1 quando sono richiamati sull'istanza. Per determinare il tipo di istanza di un tipo geometry, usare STGeometryType().

Sintassi

  
.STIsRing ( )  

Nota

Per visualizzare la sintassi Transact-SQL per SQL Server 2014 (12.x) e versioni precedenti, vedere la documentazione delle versioni precedenti.

Tipi restituiti

Tipo SQL Server restituito: bit

Tipo CLR restituito: SqlBoolean

Osservazioni:

Questo metodo restituisce Null se l'istanza non è LineString.

Esempi

Nell'esempio seguente viene creata un'istanza LineString e viene utilizzato STIsRing() per verificare se l'istanza è un anello.

DECLARE @g geometry;  
SET @g = geometry::STGeomFromText('LINESTRING(0 0, 2 2, 1 0, 0 0)', 0);  
SELECT @g.STIsRing();  

Vedi anche

STIsClosed (tipo di dati geometry)
STGeometryType (tipo di dati geometry)
STIsSimple (tipo di dati geometry)
Metodi OGC sulle istanze di geometria