Partager via


Méthode STCentroid

Returns the geometric center of a SqlGeometry instance consisting of one or more polygons.

Espace de noms :  Microsoft.SqlServer.Types
Assembly :  Microsoft.SqlServer.Types (en Microsoft.SqlServer.Types.dll)

Syntaxe

'Déclaration
<SqlMethodAttribute(IsDeterministic := True, IsPrecise := False)> _
Public Function STCentroid As SqlGeometry
'Utilisation
Dim instance As SqlGeometry
Dim returnValue As SqlGeometry

returnValue = instance.STCentroid()
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public SqlGeometry STCentroid()
[SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)]
public:
SqlGeometry^ STCentroid()
[<SqlMethodAttribute(IsDeterministic = true, IsPrecise = false)>]
member STCentroid : unit -> SqlGeometry 
public function STCentroid() : SqlGeometry

Valeur de retour

Type : Microsoft.SqlServer.Types. . :: . .SqlGeometry
A SqlGeometry object that represents the geometric center of the calling SqlGeometry.

Notes

STCentroid returns null if the SqlGeometry instance is not a Polygon or MultiPolygon type.