Condividi tramite


Classe SqlGeographyBuilder

Constructs instances of SqlGeography objects by using IGeographySink interface.

Gerarchia di ereditarietà

System.Object
  Microsoft.SqlServer.Types.SqlGeographyBuilder

Spazio dei nomi  Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)

Sintassi

'Dichiarazione
<CLSCompliantAttribute(True)> _
Public Class SqlGeographyBuilder _
    Implements IGeographySink110, IGeographySink
'Utilizzo
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

Nel tipo SqlGeographyBuilder sono esposti i membri seguenti.

Costruttori

  Nome Descrizione
Metodo pubblico SqlGeographyBuilder Constructs a SqlGeographyBuilder object.

In alto

Proprietà

  Nome Descrizione
Proprietà pubblica ConstructedGeography Retrieves the constructed spatial geography object.

In alto

Metodi

  Nome Descrizione
Metodo pubblico AddCircularArc(Double, Double, Double, Double) Adds a circular arc to the path.
Metodo pubblico AddCircularArc(Double, Double, Nullable<Double>, Nullable<Double>, Double, Double, Nullable<Double>, Nullable<Double>) Adds a circular arc to the path.
Metodo pubblico AddLine(Double, Double) Constructs additional points in a geography type figure.
Metodo pubblico AddLine(Double, Double, Nullable<Double>, Nullable<Double>) Constructs additional points in a geography type figure.
Metodo pubblico BeginFigure(Double, Double) Starts the call sequence for a geography figure.
Metodo pubblico BeginFigure(Double, Double, Nullable<Double>, Nullable<Double>) Starts the call sequence for a geography figure.
Metodo pubblico BeginGeography Initializes a call sequence for a geography type.
Metodo pubblico EndFigure Finishes a call sequence for a geography figure.
Metodo pubblico EndGeography Finishes a call sequence for a geography type.
Metodo pubblico Equals Ereditato da Object.
Metodo protetto Finalize Ereditato da Object.
Metodo pubblico GetHashCode Ereditato da Object.
Metodo pubblico GetType Ereditato da Object.
Metodo protetto MemberwiseClone Ereditato da Object.
Metodo pubblico SetSrid Sets the Spatial Reference Identifier (SRID) for a geography type call sequence.
Metodo pubblico ToString Ereditato da Object.

In alto

Osservazioni

Throws FormatException for an invalid call sequence or when a call sequence is incomplete when ConstructedGeography() is invoked.

Esempi

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

Protezione dei thread

I membri static (Shared in Visual Basic) pubblici di questo tipo sono affidabili. Non è invece garantita la sicurezza dei membri dell'istanza.

Vedere anche

Riferimento

Spazio dei nomi Microsoft.SqlServer.Types