SqlSpatialServices.GetCentroid Method (DbGeometry)

 

Returns a DbGeometry value that represents the centroid of the given DbGeometry value, which may be null if the value does not represent a surface.

Namespace:   System.Data.Entity.SqlServer
Assembly:  EntityFramework.SqlServer (in EntityFramework.SqlServer.dll)

public override DbGeometry GetCentroid(
	DbGeometry geometryValue
)

Parameters

geometryValue
Type: System.Data.Entity.Spatial.DbGeometry

The geometry value, which need not represent a surface.

Return Value

Type: System.Data.Entity.Spatial.DbGeometry

The centroid of geometryValue, if it represents a surface; otherwise, null.