Класс 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 обеспечивает доступ к следующим элементам.

Конструкторы

  Имя Описание
Открытый метод SqlGeographyBuilder Constructs a SqlGeographyBuilder object.

В начало

Свойства

  Имя Описание
Открытое свойство ConstructedGeography Retrieves the constructed spatial geography object.

В начало

Методы

  Имя Описание
Открытый метод 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();

Безопасность многопоточности

Любые открытые статический (Shared в Visual Basic) элементы этого типа потокобезопасны. Потокобезопасность с элементами экземпляров не гарантируется.

См. также

Справочник