STIntersects (type de données geography)

Retourne 1 si une instance geography croise une autre instance geography. Retourne 0 dans le cas contraire.

Syntaxe

.STIntersects ( other_geography )

Arguments

  • other_geography
    Autre instance geography à comparer à l'instance sur laquelle STIntersects() est appelée.

Types des valeurs de retour

Type de retour SQL Server : bit

Type de retour CLR : SqlBoolean

Notes

Cette méthode retourne toujours Null si les ID de référence spatiaux (SRID) des instances geography ne correspondent pas.

Exemples

L'exemple suivant utilise STIntersects() pour déterminer si deux instances geography se croisent.

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);

Voir aussi

Autres ressources