STPointOnSurface (tipo di dati geometry)

Si applica a:SQL Server database SQL di Azure Istanza gestita di SQL di Azure Endpoint di analisiSQL in Microsoft FabricWarehouse in Microsoft Fabric

Restituisce un punto arbitrario che si trova all'interno di un'istanza geometry.

Sintassi

  
.STPointOnSurface ( )  

Nota

Per visualizzare la sintassi Transact-SQL per SQL Server 2014 (12.x) e versioni precedenti, vedere la documentazione delle versioni precedenti.

Tipi restituiti

Tipo SQL Server 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();  

Vedi anche

Metodi OGC sulle istanze di geometria