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 IGeographySink
用法
Dim instance As SqlGeographyBuilder
[CLSCompliantAttribute(true)]
public class SqlGeographyBuilder : IGeographySink
[CLSCompliantAttribute(true)]
public ref class SqlGeographyBuilder : IGeographySink
[<CLSCompliantAttribute(true)>]
type SqlGeographyBuilder =
class
interface IGeographySink
end
public class SqlGeographyBuilder implements IGeographySink
SqlGeographyBuilder 类型公开以下成员。
方法
名称 | 说明 | |
---|---|---|
![]() |
AddLine(Double, Double) | Constructs additional points in a geography type figure. |
![]() |
AddLine(Double, Double, Nullable< (Of < <' (Double> ) > > ), Nullable< (Of < <' (Double> ) > > )) | Constructs additional points in a geography type figure. |
![]() |
BeginFigure(Double, Double) | Starts the call sequence for a geography figure. |
![]() |
BeginFigure(Double, Double, Nullable< (Of < <' (Double> ) > > ), Nullable< (Of < <' (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) 成员都是线程安全的。不保证所有实例成员都是线程安全的。