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
构造函数
名称 | 说明 | |
---|---|---|
SqlGeographyBuilder() | 构造 SqlGeographyBuilder 对象。 |
属性
名称 | 说明 | |
---|---|---|
ConstructedGeography | 检索所构造空间 geography 对象。 |
方法
名称 | 说明 | |
---|---|---|
AddCircularArc(Double, Double, Double, Double) | 将一个圆弧添加到路径。 |
|
AddCircularArc(Double, Double, Nullable<Double>, Nullable<Double>, Double, Double, Nullable<Double>, Nullable<Double>) | 将一个圆弧添加到路径。 |
|
AddLine(Double, Double) | 在geography类型图中构造其他点。 |
|
AddLine(Double, Double, Nullable<Double>, Nullable<Double>) | 在geography类型图中构造其他点。 |
|
BeginFigure(Double, Double) | 为geography图启动调用序列。 |
|
BeginFigure(Double, Double, Nullable<Double>, Nullable<Double>) | 为geography图启动调用序列。 |
|
BeginGeography(OpenGisGeographyType) | 初始化geography类型的调用序列。 |
|
EndFigure() | 完成的调用序列 geography 图。 |
|
EndGeography() | 完成geography类型的调用序列。 |
|
Equals(Object) | (继承自 Object。) |
|
Finalize() | (继承自 Object。) |
|
GetHashCode() | (继承自 Object。) |
|
GetType() | (继承自 Object。) |
|
MemberwiseClone() | (继承自 Object。) |
|
SetSrid(Int32) | 为geography类型调用序列设置空间引用标识符 (SRID)。 |
|
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 命名空间
返回页首