DbSpatialServices.GetCentroid 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
傳回 DbGeometry 值,此值代表指定 DbGeometry 值的中心點,如果該值不代表表面,就可能為 null。
命名空間: System.Data.Entity.Spatial
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId := "Centroid", _
Justification := "Naming convention prescribed by OGC specification")> _
Public MustOverride Function GetCentroid ( _
geometryValue As DbGeometry _
) As DbGeometry
'用途
Dim instance As DbSpatialServices
Dim geometryValue As DbGeometry
Dim returnValue As DbGeometry
returnValue = instance.GetCentroid(geometryValue)
[SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Centroid",
Justification = "Naming convention prescribed by OGC specification")]
public abstract DbGeometry GetCentroid(
DbGeometry geometryValue
)
[SuppressMessageAttribute(L"Microsoft.Naming", L"CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = L"Centroid",
Justification = L"Naming convention prescribed by OGC specification")]
public:
virtual DbGeometry^ GetCentroid(
DbGeometry^ geometryValue
) abstract
[<SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Centroid",
Justification = "Naming convention prescribed by OGC specification")>]
abstract GetCentroid :
geometryValue:DbGeometry -> DbGeometry
public abstract function GetCentroid(
geometryValue : DbGeometry
) : DbGeometry
參數
- geometryValue
類型:System.Data.Entity.Spatial.DbGeometry
幾何值,不需要代表表面。
傳回值
類型:System.Data.Entity.Spatial.DbGeometry
若 geometryValue 代表表面,即為該表面的中心點,否則為 null。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | geometryValue 為 null。 |
ArgumentException | geometryValue 與此空間服務實作不相容。 |