Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Constructs instances of SqlGeography objects by using IGeographySink interface.
Inheritance Hierarchy
System.Object
Microsoft.SqlServer.Types.SqlGeographyBuilder
Namespace: Microsoft.SqlServer.Types
Assembly: Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)
Syntax
'Declaration
<CLSCompliantAttribute(True)> _
Public Class SqlGeographyBuilder _
Implements IGeographySink110, IGeographySink
'Usage
Dim instance As 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
public class SqlGeographyBuilder implements IGeographySink110, IGeographySink
The SqlGeographyBuilder type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() |
SqlGeographyBuilder | Constructs a SqlGeographyBuilder object. |
Top
Properties
Name | Description | |
---|---|---|
![]() |
ConstructedGeography | Retrieves the constructed spatial geography object. |
Top
Methods
Name | Description | |
---|---|---|
![]() |
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 geography type figure. |
![]() |
AddLine(Double, Double, Nullable<Double>, Nullable<Double>) | Constructs additional points in a geography type figure. |
![]() |
BeginFigure(Double, Double) | Starts the call sequence for a geography figure. |
![]() |
BeginFigure(Double, Double, Nullable<Double>, Nullable<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 | (Inherited from Object.) |
![]() |
Finalize | (Inherited from Object.) |
![]() |
GetHashCode | (Inherited from Object.) |
![]() |
GetType | (Inherited from Object.) |
![]() |
MemberwiseClone | (Inherited from Object.) |
![]() |
SetSrid | Sets the Spatial Reference Identifier (SRID) for a geography type call sequence. |
![]() |
ToString | (Inherited from Object.) |
Top
Remarks
Throws FormatException for an invalid call sequence or when a call sequence is incomplete when ConstructedGeography() is invoked.
Examples
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();
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.