Nota
L'accesso a questa pagina richiede l'autorizzazione. Puoi provare ad accedere o a cambiare directory.
L'accesso a questa pagina richiede l'autorizzazione. Puoi provare a cambiare directory.
Si applica a:SQL Server
Database SQL di
AzureIstanza gestita di SQL di
AzureDatabase SQL in Microsoft Fabric
Restituisce 1 se un'istanza geography interseca un'altra istanza geography. In caso contrario, restituisce 0.
Syntax
.STIntersects ( other_geography )
Arguments
other_geography
Altra istanza geography da confrontare con l'istanza sulla quale viene chiamato STIntersects().
Tipi restituiti
Tipo SQL Server restituito: bit
Tipo CLR restituito: SqlBoolean
Remarks
Questo metodo restituisce sempre NULL se gli identificatori SRID delle istanze geography non corrispondono.
Examples
Nell'esempio seguente viene utilizzato STIntersects() per determinare se due istanze geography si intersecano.
DECLARE @g geography;
DECLARE @h geography;
SET @g = geography::STGeomFromText('POLYGON((-122.358 47.653, -122.348 47.649, -122.348 47.658, -122.358 47.658, -122.358 47.653))', 4326);
SET @h = geography::STGeomFromText('LINESTRING(-122.360 47.656, -122.343 47.656)', 4326);
SELECT CASE @g.STIntersects(@h)
WHEN 1 THEN '@g intersects @h'
ELSE '@g does not intersect @h'
END;