Share via


SqlGeographyBuilder 类

 

构造的实例 SqlGeography 通过使用对象 IGeographySink 接口。

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

继承层次结构

System.Object
  Microsoft.SqlServer.Types.SqlGeographyBuilder

语法

[CLSCompliantAttribute(true)]
public class SqlGeographyBuilder : IGeographySink110, IGeographySink
[CLSCompliantAttribute(true)]
public ref class SqlGeographyBuilder : IGeographySink110, IGeographySink
[<CLSCompliantAttribute(true)>]
type SqlGeographyBuilder = 
    class
        interface IGeographySink110
        interface IGeographySink
    end
<CLSCompliantAttribute(True)>
Public Class SqlGeographyBuilder
    Implements IGeographySink110, IGeographySink

构造函数

名称 说明
System_CAPS_pubmethod SqlGeographyBuilder()

构造 SqlGeographyBuilder 对象。

属性

名称 说明
System_CAPS_pubproperty ConstructedGeography

检索所构造空间 geography 对象。

方法

名称 说明
System_CAPS_pubmethod AddCircularArc(Double, Double, Double, Double)

将一个圆弧添加到路径。

System_CAPS_pubmethod AddCircularArc(Double, Double, Nullable<Double>, Nullable<Double>, Double, Double, Nullable<Double>, Nullable<Double>)

将一个圆弧添加到路径。

System_CAPS_pubmethod AddLine(Double, Double)

geography类型图中构造其他点。

System_CAPS_pubmethod AddLine(Double, Double, Nullable<Double>, Nullable<Double>)

geography类型图中构造其他点。

System_CAPS_pubmethod BeginFigure(Double, Double)

geography图启动调用序列。

System_CAPS_pubmethod BeginFigure(Double, Double, Nullable<Double>, Nullable<Double>)

geography图启动调用序列。

System_CAPS_pubmethod BeginGeography(OpenGisGeographyType)

初始化geography类型的调用序列。

System_CAPS_pubmethod EndFigure()

完成的调用序列 geography 图。

System_CAPS_pubmethod EndGeography()

完成geography类型的调用序列。

System_CAPS_pubmethod Equals(Object)

(继承自 Object。)

System_CAPS_protmethod Finalize()

(继承自 Object。)

System_CAPS_pubmethod GetHashCode()

(继承自 Object。)

System_CAPS_pubmethod GetType()

(继承自 Object。)

System_CAPS_protmethod MemberwiseClone()

(继承自 Object。)

System_CAPS_pubmethod SetSrid(Int32)

geography类型调用序列设置空间引用标识符 (SRID)。

System_CAPS_pubmethod ToString()

(继承自 Object。)

备注

引发 FormatException 对于一个无效的调用序列或当调用序列不完整时 ConstructedGeography() 调用。

示例

下面的示例构造 SqlGeometry 对象从 MultiLineString

SqlGeographyBuilder b = new SqlGeographyBuilder();

b.SetSrid(4326);

b.BeginGeography(OpenGisGeographyType.MultiLineString);

b.BeginGeography(OpenGisGeographyType.LineString);

b.BeginFigure(-122.358, 47.653);

b.AddLine(-122.348, 47.649);

b.EndFigure();

b.EndGeography();

b.BeginGeography(OpenGisGeographyType.LineString);

b.BeginFigure(-118.481, 48.328);

b.AddLine(-119.002, 47.324);

b.EndFigure();

b.EndGeography();

b.EndGeography();

SqlGeography g = b.ConstructedGeography();

线程安全

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

另请参阅

Microsoft.SqlServer.Types 命名空间

返回页首