SqlGeometryBuilder 类
Constructs instances of SqlGeometry objects by using IGeometrySink interface.
继承层次结构
System. . :: . .Object
Microsoft.SqlServer.Types..::..SqlGeometryBuilder
命名空间: Microsoft.SqlServer.Types
程序集: Microsoft.SqlServer.Types(在 Microsoft.SqlServer.Types.dll 中)
语法
声明
<CLSCompliantAttribute(True)> _
Public Class SqlGeometryBuilder _
Implements IGeometrySink
用法
Dim instance As SqlGeometryBuilder
[CLSCompliantAttribute(true)]
public class SqlGeometryBuilder : IGeometrySink
[CLSCompliantAttribute(true)]
public ref class SqlGeometryBuilder : IGeometrySink
[<CLSCompliantAttribute(true)>]
type SqlGeometryBuilder =
class
interface IGeometrySink
end
public class SqlGeometryBuilder implements IGeometrySink
SqlGeometryBuilder 类型公开以下成员。
方法
名称 | 说明 | |
---|---|---|
![]() |
AddLine(Double, Double) | Constructs additional points in a geometry type figure. |
![]() |
AddLine(Double, Double, Nullable< (Of < <' (Double> ) > > ), Nullable< (Of < <' (Double> ) > > )) | Constructs additional points in the call sequence for a geometry type. |
![]() |
BeginFigure(Double, Double) | Starts the call sequence for a geometry figure. |
![]() |
BeginFigure(Double, Double, Nullable< (Of < <' (Double> ) > > ), Nullable< (Of < <' (Double> ) > > )) | Starts the call sequence for a geometry figure. |
![]() |
BeginGeometry | Initializes a call sequence for a geometry type. |
![]() |
EndFigure | Finishes a call sequence for a geometry figure. |
![]() |
EndGeometry | Finishes a call sequence for a geometry type. |
![]() |
Equals | (从 Object 继承。) |
![]() |
Finalize | (从 Object 继承。) |
![]() |
GetHashCode | (从 Object 继承。) |
![]() |
GetType | (从 Object 继承。) |
![]() |
MemberwiseClone | (从 Object 继承。) |
![]() |
SetSrid | Sets the Spatial Reference Identifier (SRID) for a geometry type call sequence. |
![]() |
ToString | (从 Object 继承。) |
页首
注释
Throws FormatException for an invalid call sequence or when a call sequence is incomplete when ConstructedGeometry() is invoked.
示例
The following example constructs a SqlGeometry object from a MultiLineString.
SqlGeometryBuilder b = new SqlGeometryBuilder();
b.SetSrid(0);
b.BeginGeometry(OpenGisGeometryType.MultiLineString);
b.BeginGeometry(OpenGisGeometryType.LineString);
b.BeginFigure(1, 1);
b.AddLine(3, 4);
b.EndFigure();
b.EndGeometry();
b.BeginGeometry(OpenGisGeometryType.LineString);
b.BeginFigure(-5, -3);
b.AddLine(2, 2);
b.EndFigure();
b.EndGeometry();
b.EndGeometry();
SqlGeometry g = b.ConstructedGeometry();
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。