STPointOnSurface (type de données geometry)

Retourne un point arbitraire situé à l'intérieur d'une instance geometry.

Syntaxe

.STPointOnSurface ( )

Types des valeurs de retour

Type de retour SQL Server : geometry

Type de retour CLR : SqlGeometry

Type Open Geospatial Consortium (OGC) : Point

Notes

Cette méthode retourne la valeur Null si l'instance est vide.

Exemples

L'exemple suivant crée une instance Polygon et utilise STPointOnSurface() pour rechercher un point sur l'instance.

DECLARE @g geometry;
SET @g = geometry::STGeomFromText('POLYGON((0 0, 3 0, 3 3, 0 3, 0 0),(2 2, 2 1, 1 1, 1 2, 2 2))', 0);
SELECT @g.STPointOnSurface().ToString();

Voir aussi

Autres ressources