Share via


SqlGeometry 类

 

SqlGeometry 类型表示欧几里得(平面)坐标系中的数据。

命名空间:   Microsoft.SqlServer.Types
程序集:  Microsoft.SqlServer.Types(位于 Microsoft.SqlServer.Types.dll)

继承层次结构

System.Object
  Microsoft.SqlServer.Types.SqlGeometry

语法

[SerializableAttribute]
[SqlUserDefinedTypeAttribute(Format.UserDefined, IsByteOrdered = false, 
    MaxByteSize = -1, IsFixedLength = false)]
[CLSCompliantAttribute(true)]
public sealed class SqlGeometry : INullable, IBinarySerialize, 
    ISqlSpatialGridIndexable
[SerializableAttribute]
[SqlUserDefinedTypeAttribute(Format::UserDefined, IsByteOrdered = false, 
    MaxByteSize = -1, IsFixedLength = false)]
[CLSCompliantAttribute(true)]
public ref class SqlGeometry sealed : INullable, IBinarySerialize, 
    ISqlSpatialGridIndexable
[<Sealed>]
[<SerializableAttribute>]
[<SqlUserDefinedTypeAttribute(Format.UserDefined, IsByteOrdered = false,
    MaxByteSize = -1, IsFixedLength = false)>]
[<CLSCompliantAttribute(true)>]
type SqlGeometry = 
    class
        interface INullable
        interface IBinarySerialize
        interface ISqlSpatialGridIndexable
    end
<SerializableAttribute>
<SqlUserDefinedTypeAttribute(Format.UserDefined, IsByteOrdered := False,
    MaxByteSize := -1, IsFixedLength := False)>
<CLSCompliantAttribute(True)>
Public NotInheritable Class SqlGeometry
    Implements INullable, IBinarySerialize, ISqlSpatialGridIndexable

构造函数

名称 说明
System_CAPS_pubmethod SqlGeometry()

新实例初始化 SqlGeometry 类。

属性

名称 说明
System_CAPS_pubproperty HasM

返回 true 如果空间对象中的至少一个点包含值 M; 否则,返回 false。 该属性为只读。

System_CAPS_pubproperty HasZ

返回 true 如果空间对象中的至少一个点包含值 Z; 否则,返回 false。 该属性为只读。

System_CAPS_pubproperty IsNull

获取指示 SqlGeometry 对象是否为 Null 的值。

System_CAPS_pubproperty M

获取 SqlGeometry 实例的 M(度量)值。 度量值的语义是用户定义的。

System_CAPS_pubpropertySystem_CAPS_static Null

获取一个提供 SqlGeometry 类型的 Null 实例的只读属性。

System_CAPS_pubproperty STSrid

获取或设置一个表示该实例的空间引用标识符 (SRID) 的整数。

System_CAPS_pubproperty STX

获取 Point 实例的 X 坐标属性。

System_CAPS_pubproperty STY

获取 Point 实例的 Y 坐标属性。

System_CAPS_pubproperty Z

获取实例的 Z(标高)值。 标高值的语义是用户定义的。

方法

名称 说明
System_CAPS_pubmethod AsBinaryZM()

将标高和度量值作为二进制对象返回。

System_CAPS_pubmethod AsGml()

返回地理标记语言 (GML) 表示形式 SqlGeometry 实例。

System_CAPS_pubmethod AsTextZM()

返回 SqlGeometry 实例的开放地理空间联盟 (OGC) 熟知文本 (WKT) 表示形式,增加了该实例传递的任何 Z(标高)和 M(度量)值。

System_CAPS_pubmethod BufferWithCurves(Double)

使用曲线缓冲几何图形对象。

System_CAPS_pubmethod BufferWithTolerance(Double, Double, Boolean)

返回一个表示所有点值的并集的几何对象,这些点与 SqlGeometry 实例之间的距离小于或等于指定值,允许存在指定的公差。

System_CAPS_pubmethod CurveToLineWithTolerance(Double, Boolean)

返回的多边形近似 SqlGeometry 包含圆弧线段的实例。

System_CAPS_pubmethodSystem_CAPS_static Deserialize(SqlBytes)

从空间数据的内部 SQL Server 格式返回构建的 SqlGeometry。

System_CAPS_pubmethod Equals(Object)

(继承自 Object。)

System_CAPS_pubmethod Filter(SqlGeometry)

提供了一种快速、仅索引相交方法,可确定一个 SqlGeometry 实例是否与另一个 SqlGeometry 实例相交(假定有索引可用)。

System_CAPS_pubmethodSystem_CAPS_static GeomFromGml(SqlXml, Int32)

构造 SqlGeometry 给定表示形式的 SQL Server 子集的地理标记语言 (GML) 的实例。

System_CAPS_pubmethod GetHashCode()

(继承自 Object。)

System_CAPS_pubmethod GetType()

(继承自 Object。)

System_CAPS_pubmethod InstanceOf(String)

测试 SqlGeometry 实例是否与指定的类型相同。

System_CAPS_pubmethod IsValidDetailed()

返回帮助标识空间对象的有效性问题的消息。

System_CAPS_pubmethod MakeValid()

将无效 SqlGeometry 实例转换为具有有效开放地理空间信息联盟 (OGC) 类型的 SqlGeometry 实例。

System_CAPS_pubmethod MinDbCompatibilityLevel()

返回接受 SqlGeometry 类型的最基本的数据库兼容级别。

System_CAPS_pubmethodSystem_CAPS_static Parse(SqlString)

从开放地理空间信息联盟 (OGC) 熟知文本 (WKT) 表示形式返回 SqlGeometry 实例。

System_CAPS_pubmethodSystem_CAPS_static Point(Double, Double, Int32)

构造一个 SqlGeometry 实例,该实例表示一个根据其 X 和 Y 值以及 SRID 构造的 Point 实例。

System_CAPS_pubmethod Populate(IGeometrySink)

已过时。 将几何图形类型调用序列应用于 IGeometrySink 对象。 调用序列是图、线和点的有序集合。SqlGeometry

System_CAPS_pubmethod Populate(IGeometrySink110)

将应用 geometry 类型调用序列到 IGeometrySink 对象。

System_CAPS_pubmethod Read(BinaryReader)

geometry类型的二进制表示形式读取到一个 SqlGeometry 对象中。SqlGeometry

System_CAPS_pubmethod Reduce(Double)

返回给定 SqlGeometry 实例的近似值,该值是通过对实例运行具有给定公差的 Douglas-Peucker 算法生成的。

System_CAPS_pubmethod Serialize()

返回表示 SqlGeometry 类型的内部 SQL Server 格式的字节。

System_CAPS_pubmethod ShortestLineTo(SqlGeometry)

返回两个 SqlGeometry 实例之间的最短距离。

System_CAPS_pubmethod STArea()

返回 SqlGeometry 实例的总表面积。

System_CAPS_pubmethod STAsBinary()

返回的开放地理空间联盟 (OGC) 熟知二进制 (WKB) 表示形式 SqlGeometry 实例。 此值不包含该实例传递的任何 Z 或 M 值。

System_CAPS_pubmethod STAsText()

返回 SqlGeometry 实例的开放地理空间信息联盟 (OGC) 熟知文本 (WKT) 表示形式。 此文本将不包含该实例传递的任何 Z(标高)或 M(度量)值。

System_CAPS_pubmethod STBoundary()

返回 SqlGeometry 实例的边界。

System_CAPS_pubmethod STBuffer(Double)

返回一个几何图形对象,该对象表示所有与 SqlGeometry 实例的距离小于或等于指定值的点的并集。

System_CAPS_pubmethod STCentroid()

返回由一个或多个多边形组成的 SqlGeometry 实例的几何中心。

System_CAPS_pubmethod STContains(SqlGeometry)

指定调用 SqlGeometry 实例是否完全包含另一个 SqlGeometry。

System_CAPS_pubmethod STConvexHull()

返回表示 SqlGeometry 实例的凸包的对象。

System_CAPS_pubmethod STCrosses(SqlGeometry)

确定调用 SqlGeometry 实例是否与指定的 SqlGeometry 实例相交。

System_CAPS_pubmethod STCurveN(Int32)

返回从 SqlGeometry 实例中指定的曲线,该实例的数据类型为 LineStringCircularStringCompoundCurve

System_CAPS_pubmethod STCurveToLine()

返回的多边形近似 SqlGeometry 包含圆弧线段的实例。

System_CAPS_pubmethod STDifference(SqlGeometry)

返回一个对象,该对象表示来自一个 SqlGeometry 实例的点,这些点在另一个 SqlGeometry 实例中不存在。

System_CAPS_pubmethod STDimension()

返回 SqlGeometry 实例的最大维度。

System_CAPS_pubmethod STDisjoint(SqlGeometry)

确定调用 SqlGeometry 实例在与指定的 SqlGeometry 实例进行比较时是否处于不联接状态。

System_CAPS_pubmethod STDistance(SqlGeometry)

返回一个 SqlGeometry 实例中的点与指定的 SqlGeometry 实例中的点之间的最短距离。

System_CAPS_pubmethod STEndPoint()

返回的终结点 SqlGeometry 实例。

System_CAPS_pubmethod STEnvelope()

返回实例的最小轴对齐边界矩形。

System_CAPS_pubmethod STEquals(SqlGeometry)

确定指定的 SqlGeometry 是否与调用 SqlGeometry 具有完全相同的点集。

System_CAPS_pubmethod STExteriorRing()

返回多边形 SqlGeometry 实例的外环。

System_CAPS_pubmethodSystem_CAPS_static STGeomCollFromText(SqlChars, Int32)

返回 SqlGeometry 实例从增加任何 Z (标高) 和 M (度量) 值的开放地理空间联盟 (OGC) 熟知文本 (WKT) 表示该实例传递的。

System_CAPS_pubmethodSystem_CAPS_static STGeomCollFromWKB(SqlBytes, Int32)

从开放地理空间联盟 (OGC) 熟知二进制 (WKB) 表示形式返回 SqlGeometry 集合实例。

System_CAPS_pubmethod STGeometryN(Int32)

返回 SqlGeometry 集合中的指定 SqlGeometry。

System_CAPS_pubmethod STGeometryType()

返回由几何图形实例表示的开放地理空间联盟 (OGC) 类型名称。SqlGeometry

System_CAPS_pubmethodSystem_CAPS_static STGeomFromText(SqlChars, Int32)

返回 SqlGeometry 实例从增加任何 Z (标高) 和 M (度量) 值的开放地理空间联盟 (OGC) 熟知文本 (WKT) 表示该实例传递的。

System_CAPS_pubmethodSystem_CAPS_static STGeomFromWKB(SqlBytes, Int32)

返回 SqlGeometry 从开放地理空间联盟 (OGC) 熟知二进制 (WKB) 表示形式的实例。

System_CAPS_pubmethod STInteriorRingN(Int32)

返回 Polygon SqlGeometry 实例的指定内环。

System_CAPS_pubmethod STIntersection(SqlGeometry)

返回一个对象,它表示一个 SqlGeometry 实例与另一个 SqlGeometry 实例的交点。

System_CAPS_pubmethod STIntersects(SqlGeometry)

确定调用 SqlGeometry 实例是否与另一个 SqlGeometry 相交。

System_CAPS_pubmethod STIsClosed()

确定调用 SqlGeometry 的起点和终点是否相同。

System_CAPS_pubmethod STIsEmpty()

指示调用 SqlGeometry 实例是否为空。

System_CAPS_pubmethod STIsRing()

确定调用 SqlGeometry 实例是否为一个环。

System_CAPS_pubmethod STIsSimple()

确定调用 SqlGeometry 实例是否为简单实例。

System_CAPS_pubmethod STIsValid()

确定 SqlGeometry 实例的格式是否正确。

System_CAPS_pubmethod STLength()

返回 SqlGeometry 实例中的元素的总长度。

System_CAPS_pubmethodSystem_CAPS_static STLineFromText(SqlChars, Int32)

返回 SqlGeometry 实例从增加任何 Z (标高) 和 M (度量) 值的开放地理空间联盟 (OGC) 熟知文本 (WKT) 表示该实例传递的。

System_CAPS_pubmethodSystem_CAPS_static STLineFromWKB(SqlBytes, Int32)

从开放地理空间联盟 (OGC) 熟知二进制 (WKB) 表示形式返回 SqlGeometry LineString 实例。

System_CAPS_pubmethodSystem_CAPS_static STMLineFromText(SqlChars, Int32)

返回 SqlGeometry 实例从增加任何 Z (标高) 和 M (度量) 值的开放地理空间联盟 (OGC) 熟知文本 (WKT) 表示该实例传递的。

System_CAPS_pubmethodSystem_CAPS_static STMLineFromWKB(SqlBytes, Int32)

从开放地理空间联盟 (OGC) 熟知二进制 (WKB) 表示形式返回 SqlGeometry MultiLineString 实例。

System_CAPS_pubmethodSystem_CAPS_static STMPointFromText(SqlChars, Int32)

返回 SqlGeometry 实例从增加任何 Z (标高) 和 M (度量) 值的开放地理空间联盟 (OGC) 熟知文本 (WKT) 表示该实例传递的。

System_CAPS_pubmethodSystem_CAPS_static STMPointFromWKB(SqlBytes, Int32)

返回 SqlGeometry 从开放地理空间联盟 (OGC) 熟知二进制 (WKB) 表示形式的 Point 实例。

System_CAPS_pubmethodSystem_CAPS_static STMPolyFromText(SqlChars, Int32)

从开放地理空间信息联盟 (OGC) 熟知文本 (WKT) 表示形式返回 SqlGeometry 实例,增加了该实例传递的任何 Z(标高)和 M(度量)值。

System_CAPS_pubmethodSystem_CAPS_static STMPolyFromWKB(SqlBytes, Int32)

从开放地理空间联盟 (OGC) 熟知二进制 (WKB) 表示形式返回 SqlGeometry MultiPolygon 实例。

System_CAPS_pubmethod STNumCurves()

返回的曲线数中的一维 SqlGeometry 实例。

System_CAPS_pubmethod STNumGeometries()

返回组成 SqlGeometry 实例的 SqlGeometry 的个数。

System_CAPS_pubmethod STNumInteriorRing()

返回 Polygon SqlGeometry 实例的内环数。

System_CAPS_pubmethod STNumPoints()

返回 SqlGeometry 实例的每个图形中的点数的总和。

System_CAPS_pubmethod STOverlaps(SqlGeometry)

确定指定的 SqlGeometry 对象是否与当前 SqlGeometry 重叠。

System_CAPS_pubmethodSystem_CAPS_static STPointFromText(SqlChars, Int32)

返回 SqlGeometry 实例从增加任何 Z (标高) 和 M (度量) 值的开放地理空间联盟 (OGC) 熟知文本 (WKT) 表示该实例传递的。

System_CAPS_pubmethodSystem_CAPS_static STPointFromWKB(SqlBytes, Int32)

返回 SqlGeometry 从开放地理空间联盟 (OGC) 熟知二进制 (WKB) 表示形式的 Point 实例。

System_CAPS_pubmethod STPointN(Int32)

返回在指定的点 SqlGeometry 实例。

System_CAPS_pubmethod STPointOnSurface()

返回一个位于 SqlGeometry 实例内部的任意点。

System_CAPS_pubmethodSystem_CAPS_static STPolyFromText(SqlChars, Int32)

返回 SqlGeometry 实例从增加任何 Z (标高) 和 M (度量) 值的开放地理空间联盟 (OGC) 熟知文本 (WKT) 表示该实例传递的。

System_CAPS_pubmethodSystem_CAPS_static STPolyFromWKB(SqlBytes, Int32)

从开放地理空间联盟 (OGC) 熟知二进制 (WKB) 表示形式返回 SqlGeometry Polygon 实例。

System_CAPS_pubmethod STRelate(SqlGeometry, String)

确定调用 SqlGeometry 是否与指定的 SqlGeometry 相关。

System_CAPS_pubmethod STStartPoint()

返回 SqlGeometry 实例的起始点。

System_CAPS_pubmethod STSymDifference(SqlGeometry)

返回一个对象,它表示位于一个 SqlGeometry 实例或另一个 SqlGeometry 实例中的所有点,但不包含同时位于这两个实例中的点。

System_CAPS_pubmethod STTouches(SqlGeometry)

确定指定的 SqlGeometry 对象是否与当前 SqlGeometry 接触。

System_CAPS_pubmethod STUnion(SqlGeometry)

返回一个对象,它表示一个 SqlGeometry 实例与另一个 SqlGeometry 实例的并集。

System_CAPS_pubmethod STWithin(SqlGeometry)

确定当前 SqlGeometry 是否完全位于指定的 SqlGeometry 实例中。

System_CAPS_pubmethod ToString()

返回的开放地理空间联盟 (OGC) 熟知文本 (WKT) 表示形式 SqlGeometry 实例增强任何 Z (标高) 和 M (度量) 值,使该实例传递的。(覆盖 Object.ToString()。)

System_CAPS_pubmethod Write(BinaryWriter)

SqlGeometry 实例写入二进制流。SqlGeometry

显式接口实现

名称 说明
System_CAPS_pubinterfaceSystem_CAPS_privmethod ISqlSpatialGridIndexable.BufferForDistanceQuery(Double, Boolean)

返回 SQL 几何图形的距离查询的缓冲区。

System_CAPS_pubinterfaceSystem_CAPS_privmethod ISqlSpatialGridIndexable.GetBoundingBoxCorners(Double, Double, Double, Double)

返回 SQL 几何图形的边界框角的值。

System_CAPS_pubinterfaceSystem_CAPS_privmethod ISqlSpatialGridIndexable.GetGridCoverage(Boolean, Double, Double, Double, Double, Double, Double, Int32, Int32, Boolean[,], Boolean[,], Int32, Int32, Boolean, Boolean)

返回 SQL 几何图形的网格覆盖。

System_CAPS_pubinterfaceSystem_CAPS_privmethod ISqlSpatialGridIndexable.InteriorBufferForDistanceQuery(Double)

返回 SQL 几何图形的距离查询的内部缓冲区。

备注

SQL Server 2016 几何空间数据类型支持一组方法。 这些方法包括开放地理空间联盟 (OGC) 标准和一组对该标准的 Microsoft 扩展定义几何图形方法。

线程安全

此类型的所有公共静态(Visual Basic 中的 已共享 在 Visual Basic 中)成员都是线程安全的。不保证所有实例成员都是线程安全的。

另请参阅

Microsoft.SqlServer.Types 命名空间

返回页首