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 IGeometrySink110, IGeometrySink
'用途
Dim instance As SqlGeometryBuilder
[CLSCompliantAttribute(true)]
public class SqlGeometryBuilder : IGeometrySink110,
IGeometrySink
[CLSCompliantAttribute(true)]
public ref class SqlGeometryBuilder : IGeometrySink110,
IGeometrySink
[<CLSCompliantAttribute(true)>]
type SqlGeometryBuilder =
class
interface IGeometrySink110
interface IGeometrySink
end
public class SqlGeometryBuilder implements IGeometrySink110, IGeometrySink
SqlGeometryBuilder 型別公開下列成員。
建構函式
名稱 | 說明 | |
---|---|---|
SqlGeometryBuilder | Constructs a SqlGeometryBuilder object. |
上層
屬性
名稱 | 說明 | |
---|---|---|
ConstructedGeometry | Retrieves constructed spatial geometry 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 geometry type figure. | |
AddLine(Double, Double, Nullable<Double>, Nullable<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<Double>, Nullable<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) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。