共用方式為


SqlGeographyBuilder 類別

Constructs instances of SqlGeography objects by using IGeographySink interface.

繼承階層

System.Object
  Microsoft.SqlServer.Types.SqlGeographyBuilder

命名空間:  Microsoft.SqlServer.Types
組件:  Microsoft.SqlServer.Types (在 Microsoft.SqlServer.Types.dll 中)

語法

'宣告
<CLSCompliantAttribute(True)> _
Public Class SqlGeographyBuilder _
    Implements IGeographySink110, IGeographySink
'用途
Dim instance As 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
public class SqlGeographyBuilder implements IGeographySink110, IGeographySink

SqlGeographyBuilder 型別公開下列成員。

建構函式

  名稱 說明
公用方法 SqlGeographyBuilder Constructs a SqlGeographyBuilder object.

上層

屬性

  名稱 說明
公用屬性 ConstructedGeography Retrieves the constructed spatial geography object.

上層

方法

  名稱 說明
公用方法 AddCircularArc(Double, Double, Double, Double) Adds a circular arc to the path.
公用方法 AddCircularArc(Double, Double, Nullable<Double>, Nullable<Double>, Double, Double, Nullable<Double>, Nullable<Double>) Adds a circular arc to the path.
公用方法 AddLine(Double, Double) Constructs additional points in a geography type figure.
公用方法 AddLine(Double, Double, Nullable<Double>, Nullable<Double>) Constructs additional points in a geography type figure.
公用方法 BeginFigure(Double, Double) Starts the call sequence for a geography figure.
公用方法 BeginFigure(Double, Double, Nullable<Double>, Nullable<Double>) Starts the call sequence for a geography figure.
公用方法 BeginGeography Initializes a call sequence for a geography type.
公用方法 EndFigure Finishes a call sequence for a geography figure.
公用方法 EndGeography Finishes a call sequence for a geography type.
公用方法 Equals (繼承自 Object。)
受保護的方法 Finalize (繼承自 Object。)
公用方法 GetHashCode (繼承自 Object。)
公用方法 GetType (繼承自 Object。)
受保護的方法 MemberwiseClone (繼承自 Object。)
公用方法 SetSrid Sets the Spatial Reference Identifier (SRID) for a geography type call sequence.
公用方法 ToString (繼承自 Object。)

上層

備註

Throws FormatException for an invalid call sequence or when a call sequence is incomplete when ConstructedGeography() is invoked.

範例

The following example constructs a SqlGeometry object from a 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();

執行緒安全性

這個型別的任何公用 static (在 Visual Basic 中為 Shared) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。

請參閱

參考

Microsoft.SqlServer.Types 命名空間