Aracılığıyla paylaş


STCentroid (veri türü geometri)

Geometrik ortasını verir bir geometry örnek bir veya daha fazla çokgenler oluşan.

.STCentroid ( )

Dönüş Türleri

SQL Server döndürme türü: geometry

CLR dönüş türü: SqlGeometry

Jeo Konsorsiyumu (OGC) türü açın: Point

Remarks

STCentroid() null ise döndürür geometry örnek değil bir Polygon veya MultiPolygon TYPE.

Örnekler

The following example uses STCentroid() to create a polygongeometry instance and compute its centroid.

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.STCentroid().ToString();