STUnion (type de données geography)

Retourne un objet qui représente l'union d'une instance geography avec une autre instance geography.

Syntaxe

.STUnion ( other_geography )

Arguments

  • other_geography
    Autre instance geography avec laquelle former une union avec l'instance sur laquelle STUnion() est appelée.

Types des valeurs de retour

Type de retour SQL Server : geography

Type de retour CLR : SqlGeography

Notes

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

Exemples

L'exemple suivant utilise STUnion() pour calculer l'union de deux instances Polygon.

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('POLYGON((-122.351 47.656, -122.341 47.656, -122.341 47.661, -122.351 47.661, -122.351 47.656))', 4326);
SELECT @g.STUnion(@h).ToString();

Voir aussi

Autres ressources