STPointOnSurface (tipo di dati geometry)
Restituisce un punto arbitrario che si trova all'interno di un'istanza geometry.
Sintassi
.STPointOnSurface ( )
Tipi restituiti
SQL Server tipo restituito: geometry
Tipo CLR restituito: SqlGeometry
Tipo OGC (Open Geospatial Consortium): Point
Osservazioni
Se l'istanza è vuota, il metodo restituisce Null.
Esempi
Nell'esempio seguente viene creata un'istanza Polygon e viene utilizzato STPointOnSurface() per trovare un punto nell'istanza.
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();