Condividi tramite


Metodo DbSpatialServices.GetCentroid

[Questa pagina è specifica della versione 6 di Entity Framework. La versione più recente è disponibile come pacchetto NuGet per "Entity Framework". Per ulteriori informazioni su Entity Framework, vedere la pagina msdn.com/data/ef.]

Restituisce un valore DbGeometry che rappresenta il centroide del valore DbGeometry specificato, che potrebbe essere Null se il valore non rappresenta una superficie.

Spazio dei nomi:  System.Data.Entity.Spatial
Assembly:  EntityFramework (in EntityFramework.dll)

Sintassi

'Dichiarazione
<SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId := "Centroid",  _
    Justification := "Naming convention prescribed by OGC specification")> _
Public MustOverride Function GetCentroid ( _
    geometryValue As DbGeometry _
) As DbGeometry
'Utilizzo
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

Parametri

Valore restituito

Tipo: System.Data.Entity.Spatial.DbGeometry
Centroide di geometryValue, se rappresenta una superficie. In caso contrario, Null.

Eccezioni

Eccezione Condizione
ArgumentNullException

geometryValue è null.

ArgumentException

geometryValue non è compatibile con l'implementazione spaziale dei servizi.

Vedere anche

Riferimento

DbSpatialServices Classe

Spazio dei nomi System.Data.Entity.Spatial