DbSpatialServices.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.
Assembly: EntityFramework (in EntityFramework.dll)
[SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Centroid", Justification = "Naming convention prescribed by OGC specification")] public abstract 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.DbGeometryThe centroid of geometryValue, if it represents a surface; otherwise, null.
Exception | Condition |
---|---|
ArgumentNullException | geometryValue is null. |
ArgumentException | geometryValue is not compatible with this spatial services implementation. |