STIntersection (type de données geography)

Retourne un objet qui représente les points où une instance geography croise une autre instance geography.

Syntaxe

.STIntersection ( other_geography )

Arguments

  • other_geography
    Autre instance geography à comparer avec l'instance sur laquelle STIntersection() est appelée, afin de déterminer où elles se croisent.

Types des valeurs de retour

Type de retour SQL Server : geography

Type de retour CLR : SqlGeography

Notes

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

Exemples

L'exemple suivant utilise STIntersection() pour calculer l'intersection d'un Polygon et d'un LineString.

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 @g.STIntersection(@h).ToString();

Voir aussi

Autres ressources