STIntersects (tipo di dati geography)
Restituisce 1 se un'istanza geography interseca un'altra istanza geography. In caso contrario, restituisce 0.
Sintassi
.STIntersects ( other_geography )
Argomenti
- other_geography
Altra istanza geography da confrontare con l'istanza sulla quale STIntersects() viene richiamato.
Tipi restituiti
Tipo SQL Server restituito: bitbit
Tipo CLR restituito: SqlBooleanSqlBoolean
Osservazioni
Questo metodo restituisce sempre Null se gli identificatori SRID delle istanze geography non corrispondono.
Esempi
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);