SqlGeographyBuilder Class

 

Constructs instances of SqlGeography objects by using IGeographySink interface.

Namespace:   Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)

System::Object
  Microsoft.SqlServer.Types::SqlGeographyBuilder

[CLSCompliantAttribute(true)]
public ref class SqlGeographyBuilder : IGeographySink110, IGeographySink

NameDescription
System_CAPS_pubmethodSqlGeographyBuilder()

Constructs a SqlGeographyBuilder object.

NameDescription
System_CAPS_pubpropertyConstructedGeography

Retrieves the constructed spatial geography object.

NameDescription
System_CAPS_pubmethodAddCircularArc(Double, Double, Double, Double)

Adds a circular arc to the path.

System_CAPS_pubmethodAddCircularArc(Double, Double, Nullable<Double>, Nullable<Double>, Double, Double, Nullable<Double>, Nullable<Double>)

Adds a circular arc to the path.

System_CAPS_pubmethodAddLine(Double, Double)

Constructs additional points in a geography type figure.

System_CAPS_pubmethodAddLine(Double, Double, Nullable<Double>, Nullable<Double>)

Constructs additional points in a geography type figure.

System_CAPS_pubmethodBeginFigure(Double, Double)

Starts the call sequence for a geography figure.

System_CAPS_pubmethodBeginFigure(Double, Double, Nullable<Double>, Nullable<Double>)

Starts the call sequence for a geography figure.

System_CAPS_pubmethodBeginGeography(OpenGisGeographyType)

Initializes a call sequence for a geography type.

System_CAPS_pubmethodEndFigure()

Finishes a call sequence for a geography figure.

System_CAPS_pubmethodEndGeography()

Finishes a call sequence for a geography type.

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodSetSrid(Int32)

Sets the Spatial Reference Identifier (SRID) for a geography type call sequence.

System_CAPS_pubmethodToString()

(Inherited from 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();

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: