DbSpatialServices 类

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

与提供程序无关的服务 API,用于支持地理空间(几何/地理)类型。

继承层次结构

System.Object
  System.Data.Entity.Spatial.DbSpatialServices
    System.Data.Entity.SqlServer.SqlSpatialServices

命名空间:  System.Data.Entity.Spatial
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
<SerializableAttribute> _
Public MustInherit Class DbSpatialServices
用法
Dim instance As DbSpatialServices
[SerializableAttribute]
public abstract class DbSpatialServices
[SerializableAttribute]
public ref class DbSpatialServices abstract
[<AbstractClassAttribute>]
[<SerializableAttribute>]
type DbSpatialServices =  class end
public abstract class DbSpatialServices

DbSpatialServices 类型公开以下成员。

构造函数

  名称 描述
受保护的方法 DbSpatialServices 初始化 DbSpatialServices 类的新实例。

顶部

属性

  名称 描述
公共属性静态成员 Default 为 DbSpatialServices 获取默认服务。
公共属性 NativeTypesAvailable 获取一个值,该值指示 EF 是否将在假定提供程序具有所需的类型/资源而非更快失败的情况下继续运行。默认值为 true。

顶部

方法

  名称 描述
公共方法 AsBinary(DbGeography) 获取给定 DbGeography 值的已知二进制表示形式。
公共方法 AsBinary(DbGeometry) 获取给定 DbGeometry 值的已知二进制表示形式。
公共方法 AsGml(DbGeography) 生成此 DbGeography 值的地理标记语言 (GML) 表示形式。
公共方法 AsGml(DbGeometry) 生成此 DbGeometry 值的地理标记语言 (GML) 表示形式。
公共方法 AsText(DbGeography) 获取给定 DbGeography 值的已知文本表示形式。此值仅应包含点的经度和纬度。
公共方法 AsText(DbGeometry) 获取给定 DbGeometry 值的已知文本表示形式,仅包含点的 X 和 Y 坐标。
公共方法 AsTextIncludingElevationAndMeasure(DbGeography) 返回 DbSpatialServices 带有海拔和测量值的文本表示形式。
公共方法 AsTextIncludingElevationAndMeasure(DbGeometry) 返回 DbSpatialServices 带有海拔和测量值的文本表示形式。
公共方法 Buffer(DbGeography, Double) 创建一个地理值,该值表示所有距离小于或等于所给定 DbGeography 值的点。
公共方法 Buffer(DbGeometry, Double) 创建一个几何值,该值表示所有距离小于或等于所给定 DbGeometry 的点。
公共方法 Contains 确定一个 DbGeometry 值是否在空间上包含另一个值。
受保护的方法静态成员 CreateGeography 在进行指定提供程序值的合适验证后,此方法主要由 GeographyFromProviderValue(Object) 的派生实现使用,以确保其适用于派生实现。
受保护的方法静态成员 CreateGeometry 在进行指定提供程序值的合适验证后,此方法主要由 GeometryFromProviderValue(Object) 的派生实现使用,以确保其适用于派生实现。
公共方法 CreateProviderValue(DbGeographyWellKnownValue) 基于指定的已知 DbGeography 表示形式,创建一个兼容此空间服务实现的提供程序特定值。
公共方法 CreateProviderValue(DbGeometryWellKnownValue) 基于指定的已知 DbGeometry 表示形式,创建一个兼容此空间服务实现的提供程序特定值。
公共方法 CreateWellKnownValue(DbGeography) 使用其中一个或这两个标准已知空间格式,创建表示指定 DbGeographyWellKnownValue 值的 DbGeography 实例。
公共方法 CreateWellKnownValue(DbGeometry) 使用其中一个或这两个标准已知空间格式,创建表示指定 DbGeometryWellKnownValue 值的 DbGeometry 实例。
公共方法 Crosses 确定两个给定的 DbGeometry 值是否在空间上相交。
公共方法 Difference(DbGeography, DbGeography) 计算两个 DbGeography 值的差异。
公共方法 Difference(DbGeometry, DbGeometry) 计算两个 DbGeometry 值的差异。
公共方法 Disjoint(DbGeography, DbGeography) 确定两个给定的 DbGeography 值是否在空间上不相交。
公共方法 Disjoint(DbGeometry, DbGeometry) 确定两个给定的 DbGeometry 值是否在空间上不相交。
公共方法 Distance(DbGeography, DbGeography) 计算两个 DbGeography 值中最接近的点之间的距离。
公共方法 Distance(DbGeometry, DbGeometry) 计算两个 DbGeometry 值中最接近的点之间的距离。
公共方法 ElementAt(DbGeography, Int32) 如果表示地理集合,则返回给定 DbGeography 值的元素。
公共方法 ElementAt(DbGeometry, Int32) 如果表示几何集合,则返回给定 DbGeometry 值的元素。
公共方法 Equals (继承自 Object。)
受保护的方法 Finalize (继承自 Object。)
公共方法 GeographyCollectionFromBinary 基于指定的已知二进制值和坐标系标识符 (SRID) 创建新的 DbGeography 集合值。
公共方法 GeographyCollectionFromText 基于指定的已知文本值和坐标系标识符 (SRID) 创建新的 DbGeography 集合值。
公共方法 GeographyFromBinary(Byte[]) 基于指定的已知二进制值创建新的 DbGeography 值。
公共方法 GeographyFromBinary(Byte[], Int32) 基于指定的已知二进制值和坐标系标识符 (SRID) 创建新的 DbGeography 值。
公共方法 GeographyFromGml(String) 基于指定的地理标记语言 (GML) 值创建新的 DbGeography 值。
公共方法 GeographyFromGml(String, Int32) 基于指定的地理标记语言 (GML) 值和坐标系标识符 (SRID) 创建新的 DbGeography 值。
公共方法 GeographyFromProviderValue 基于与此空间服务实现兼容的提供程序特定的值创建新的 DbGeography 值。
公共方法 GeographyFromText(String) 基于指定的已知文本值创建新的 DbGeography 值。
公共方法 GeographyFromText(String, Int32) 基于指定的已知文本值和坐标系标识符 (SRID) 创建新的 DbGeography 值。
公共方法 GeographyLineFromBinary 基于指定的已知二进制值和坐标系标识符 (SRID) 创建新的 DbGeography 线值。
公共方法 GeographyLineFromText 基于指定的已知文本值和坐标系标识符 (SRID) 创建新的 DbGeography 线值。
公共方法 GeographyMultiLineFromBinary 基于指定的已知二进制值和坐标系标识符,创建一个新的 DbGeography 多线值。
公共方法 GeographyMultiLineFromText 基于指定的已知文本值和坐标系标识符,创建一个新的 DbGeography 多线值。
公共方法 GeographyMultiPointFromBinary 基于指定的已知二进制值和坐标系标识符,创建一个新的 DbGeography 多点值。
公共方法 GeographyMultiPointFromText 基于指定的已知文本值和坐标系标识符,创建一个新的 DbGeography 多点值。
公共方法 GeographyMultiPolygonFromBinary 基于指定的已知二进制值和坐标系标识符,创建一个新的 DbGeography 多多边形值。
公共方法 GeographyMultiPolygonFromText 基于指定的已知文本值和坐标系标识符,创建一个新的 DbGeography 多多边形值。
公共方法 GeographyPointFromBinary 基于指定的已知二进制值和坐标系标识符 (SRID) 创建新的 DbGeography 点值。
公共方法 GeographyPointFromText 基于指定的已知文本值和坐标系标识符 (SRID) 创建新的 DbGeography 点值。
公共方法 GeographyPolygonFromBinary 基于指定的已知二进制值和坐标系标识符 (SRID) 创建新的 DbGeography 多边形值。
公共方法 GeographyPolygonFromText 基于指定的已知文本值和坐标系标识符 (SRID) 创建新的 DbGeography 多边形值。
公共方法 GeometryCollectionFromBinary 基于指定的已知二进制值和坐标系标识符 (SRID) 创建新的 DbGeometry 集合值。
公共方法 GeometryCollectionFromText 基于指定的已知文本值和坐标系标识符 (SRID) 创建新的 DbGeometry 集合值。
公共方法 GeometryFromBinary(Byte[]) 基于指定的已知二进制值创建新的 DbGeometry 值。
公共方法 GeometryFromBinary(Byte[], Int32) 基于指定的已知二进制值和坐标系标识符 (SRID) 创建新的 DbGeometry 值。
公共方法 GeometryFromGml(String) 基于指定的地理标记语言 (GML) 值创建新的 DbGeometry 值。
公共方法 GeometryFromGml(String, Int32) 基于指定的地理标记语言 (GML) 值和坐标系标识符 (SRID) 创建新的 DbGeometry 值。
公共方法 GeometryFromProviderValue 基于与此空间服务实现兼容的提供程序特定的值创建新的 DbGeometry 值。
公共方法 GeometryFromText(String) 基于指定的已知文本值创建新的 DbGeometry 值。
公共方法 GeometryFromText(String, Int32) 基于指定的已知文本值和坐标系标识符 (SRID) 创建新的 DbGeometry 值。
公共方法 GeometryLineFromBinary 基于指定的已知二进制值和坐标系标识符 (SRID) 创建新的 DbGeometry 线值。
公共方法 GeometryLineFromText 基于指定的已知文本值和坐标系标识符 (SRID) 创建新的 DbGeometry 线值。
公共方法 GeometryMultiLineFromBinary 基于指定的已知二进制值和坐标系标识符,创建一个新的 DbGeometry 多线值。
公共方法 GeometryMultiLineFromText 基于指定的已知文本值和坐标系标识符,创建一个新的 DbGeometry 多线值。
公共方法 GeometryMultiPointFromBinary 基于指定的已知二进制值和坐标系标识符,创建一个新的 DbGeometry 多点值。
公共方法 GeometryMultiPointFromText 基于指定的已知文本值和坐标系标识符,创建一个新的 DbGeometry 多点值。
公共方法 GeometryMultiPolygonFromBinary 基于指定的已知二进制值和坐标系标识符,创建一个新的 DbGeometry 多多边形值。
公共方法 GeometryMultiPolygonFromText 基于指定的已知文本值和坐标系标识符,创建一个新的 DbGeometry 多多边形值。
公共方法 GeometryPointFromBinary 基于指定的已知二进制值和坐标系标识符 (SRID) 创建新的 DbGeometry 点值。
公共方法 GeometryPointFromText 基于指定的已知文本值和坐标系标识符 (SRID) 创建新的 DbGeometry 点值。
公共方法 GeometryPolygonFromBinary 基于指定的已知二进制值和坐标系标识符 (SRID) 创建新的 DbGeometry 多边形值。
公共方法 GeometryPolygonFromText 基于指定的已知文本值和坐标系标识符 (SRID) 创建新的 DbGeometry 多边形值。
公共方法 GetArea(DbGeography) 返回一个指示给定 DbGeography 值的面积、可以为 null 的双精度值,如果该值不表示面则可能为 null。
公共方法 GetArea(DbGeometry) 返回一个指示给定 DbGeometry 值的面积、可以为 null 的双精度值,如果该值不表示面则可能为 null。
公共方法 GetBoundary 返回一个指示给定 DbGeography 值的边界、可以为 null 的双精度值。
公共方法 GetCentroid 返回表示给定 DbGeometry 值形心的 DbGeometry 值,如果该值不表示面则可能为 null。
公共方法 GetConvexHull 返回一个指示给定 DbGeography 值的凸包、可以为 null 的双精度值。
公共方法 GetCoordinateSystemId(DbGeography) 返回给定 DbGeography 值的坐标系标识符。
公共方法 GetCoordinateSystemId(DbGeometry) 返回给定 DbGeometry 值的坐标系标识符。
公共方法 GetDimension(DbGeography) 获取给定 DbGeography 值的维度(如果值为集合)或最大的元素维度。
公共方法 GetDimension(DbGeometry) 获取给定 DbGeometry 值的维度(如果值为集合)或最大的元素维度。
公共方法 GetElementCount(DbGeography) 如果表示地理集合,则返回给定 DbGeography 值的元素数目。
公共方法 GetElementCount(DbGeometry) 如果表示几何集合,则返回给定 DbGeometry 值的元素数目。
公共方法 GetElevation(DbGeography) 如果表示点,则返回给定 DbGeography 值的海拔(Z 坐标)。
公共方法 GetElevation(DbGeometry) 如果表示点,则返回给定 DbGeometry 值的海拔 (Z)。
公共方法 GetEndPoint(DbGeography) 返回表示给定 DbGeography 值终点的 DbGeography 值,如果该值不表示曲线则可能为 null。
公共方法 GetEndPoint(DbGeometry) 返回表示给定 DbGeometry 值终点的 DbGeometry 值,如果该值不表示曲线则可能为 null。
公共方法 GetEnvelope 获取给定的 DbGeometry 值的包络线(最小边界框)作为几何值。
公共方法 GetExteriorRing 返回表示给定 DbGeometry 值外部环的 DbGeometry 值,如果该值不表示多边形则可能为 null。
公共方法 GetHashCode (继承自 Object。)
公共方法 GetInteriorRingCount 如果表示多边形,则返回给定 DbGeometry 值中的内部环数。
公共方法 GetIsClosed(DbGeography) 返回可以为 null 的布尔值,该值指示给定的 DbGeography 值是否闭合;如果该值不表示曲线则可能为 null。
公共方法 GetIsClosed(DbGeometry) 返回可以为 null 的布尔值,该值指示给定的 DbGeometry 值是否闭合;如果该值不表示曲线则可能为 null。
公共方法 GetIsEmpty(DbGeography) 返回一个可以为 null 的布尔值,该值指示给定的 DbGeography 值是否为空。
公共方法 GetIsEmpty(DbGeometry) 返回一个可以为 null 的布尔值,该值指示给定的 DbGeometry 值是否为空。
公共方法 GetIsRing 返回可以为 null 的布尔值,该值指示给定的 DbGeometry 值是否是环;如果该值不表示曲线则可能为 null。
公共方法 GetIsSimple 返回一个可以为 null 的布尔值,该值指示给定的 DbGeometry 值是否很简单。
公共方法 GetIsValid 返回一个可以为 null 的布尔值,该值指示给定的 DbGeometry 值是否有效。
公共方法 GetLatitude 如果表示点,则返回给定 DbGeography 值的纬度坐标。
公共方法 GetLength(DbGeography) 返回一个指示给定 DbGeography 值的长度、可以为 null 的双精度值,如果该值不表示曲线则可能为 null。
公共方法 GetLength(DbGeometry) 返回一个指示给定 DbGeometry 值的长度、可以为 null 的双精度值,如果该值不表示曲线则可能为 null。
公共方法 GetLongitude 如果表示点,则返回给定 DbGeography 值的经度坐标。
公共方法 GetMeasure(DbGeography) 如果表示点,则返回给定 DbGeography 值的 M(度量值)坐标。
公共方法 GetMeasure(DbGeometry) 如果表示点,则返回给定 DbGeometry 值的 M(度量值)坐标。
公共方法 GetPointCount(DbGeography) 如果表示行字符串或线性环,则返回给定 DbGeography 值中的点数。
公共方法 GetPointCount(DbGeometry) 如果表示行字符串或线性环,则返回给定 DbGeometry 值中的点数。
公共方法 GetPointOnSurface 返回表示给定 DbGeometry 值面上点的 DbGeometry 值,如果该值不表示面则可能为 null。
公共方法 GetSpatialTypeName(DbGeography) 返回指示给定 DbGeography 值的空间类型名称的值。
公共方法 GetSpatialTypeName(DbGeometry) 返回指示给定 DbGeometry 值的空间类型名称的值。
公共方法 GetStartPoint(DbGeography) 返回表示给定 DbGeography 值起点的 DbGeography 值,如果该值不表示曲线则可能为 null。
公共方法 GetStartPoint(DbGeometry) 返回表示给定 DbGeometry 值起点的 DbGeometry 值,如果该值不表示曲线则可能为 null。
公共方法 GetType (继承自 Object。)
公共方法 GetXCoordinate 如果表示点,则返回给定 DbGeometry 值的 X 坐标。
公共方法 GetYCoordinate 如果表示点,则返回给定 DbGeometry 值的 Y 坐标。
公共方法 InteriorRingAt 如果表示多边形,则返回给定 DbGeometry 值中的内部环。
公共方法 Intersection(DbGeography, DbGeography) 计算两个 DbGeography 值的交集。
公共方法 Intersection(DbGeometry, DbGeometry) 计算两个 DbGeometry 值的交集。
公共方法 Intersects(DbGeography, DbGeography) 确定两个给定的 DbGeography 值是否在空间上相交。
公共方法 Intersects(DbGeometry, DbGeometry) 确定两个给定的 DbGeometry 值是否在空间上相交。
受保护的方法 MemberwiseClone (继承自 Object。)
公共方法 Overlaps 确定两个给定的 DbGeometry 值是否在空间上重叠。
公共方法 PointAt(DbGeography, Int32) 如果表示行字符串或线性环,则返回给定 DbGeography 值的点元素。
公共方法 PointAt(DbGeometry, Int32) 如果表示行字符串或线性环,则返回给定 DbGeometry 值的点元素。
公共方法 Relate 根据给定的维度扩展的 9 交集模型 (DE-9IM) 交集模式来确定两个给定的 DbGeometry 值在空间上是否相关。
公共方法 SpatialEquals(DbGeography, DbGeography) 确定两个给定的 DbGeography 值在空间上是否相等。
公共方法 SpatialEquals(DbGeometry, DbGeometry) 确定两个给定的 DbGeometry 值在空间上是否相等。
公共方法 SymmetricDifference(DbGeography, DbGeography) 计算两个 DbGeography 值的对称差异。
公共方法 SymmetricDifference(DbGeometry, DbGeometry) 计算两个 DbGeometry 值的对称差异。
公共方法 ToString (继承自 Object。)
公共方法 Touches 确定两个给定的 DbGeometry 值在空间上是否接触。
公共方法 Union(DbGeography, DbGeography) 计算两个 DbGeography 值的并集。
公共方法 Union(DbGeometry, DbGeometry) 计算两个 DbGeometry 值的并集。
公共方法 Within 确定一个 DbGeometry 值在空间上是否在另一几何值内。

顶部

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

System.Data.Entity.Spatial 命名空间