Condividi tramite


STTouches (tipo di dati geometry)

Si applica a:SQL ServerDatabase SQL di AzureIstanza gestita di SQL di AzureDatabase SQL in Microsoft Fabric

Restituisce 1 se un'istanza geometry tocca a livello spaziale un'altra istanza geometry. In caso contrario, restituisce 0.

Syntax

  
.STTouches ( other_geometry )  

Arguments

other_geometry
Altra istanza geometry da confrontare con l'istanza sulla quale viene chiamato STTouches().

Tipi restituiti

Tipo SQL Server restituito: bit

Tipo CLR restituito: SqlBoolean

Remarks

Due istanze geometry si toccano se si intersecano i relativi set di punti, ma non le parti interne.

Questo metodo restituisce sempre Null se gli identificatori SRID delle istanze geometry non corrispondono.

Examples

Nell'esempio seguente viene utilizzato STTouches() per verificare se due istanze geometry si toccano.

DECLARE @g geometry;  
DECLARE @h geometry;  
SET @g = geometry::STGeomFromText('LINESTRING(0 2, 2 0, 4 2)', 0);  
SET @h = geometry::STGeomFromText('POINT(1 1)', 0);  
SELECT @g.STTouches(@h);  

Vedere anche

Panoramica degli indici spaziali
Metodi OGC sulle istanze di geometria