Classe SqlGeometryBuilder
Constructs instances of SqlGeometry objects by using IGeometrySink interface.
Hierarquia de herança
System. . :: . .Object
Microsoft.SqlServer.Types..::..SqlGeometryBuilder
Namespace: Microsoft.SqlServer.Types
Assembly: Microsoft.SqlServer.Types (em Microsoft.SqlServer.Types.dll)
Sintaxe
'Declaração
<CLSCompliantAttribute(True)> _
Public Class SqlGeometryBuilder _
Implements IGeometrySink
'Uso
Dim instance As SqlGeometryBuilder
[CLSCompliantAttribute(true)]
public class SqlGeometryBuilder : IGeometrySink
[CLSCompliantAttribute(true)]
public ref class SqlGeometryBuilder : IGeometrySink
[<CLSCompliantAttribute(true)>]
type SqlGeometryBuilder =
class
interface IGeometrySink
end
public class SqlGeometryBuilder implements IGeometrySink
O tipo SqlGeometryBuilder expõe os membros a seguir.
Propriedades
Nome | Descrição | |
---|---|---|
ConstructedGeometry | Retrieves constructed spatial geometry object. |
Início
Métodos
Nome | Descrição | |
---|---|---|
AddLine(Double, Double) | Constructs additional points in a geometry type figure. | |
AddLine(Double, Double, Nullable< (Of < <' (Double> ) > > ), Nullable< (Of < <' (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< (Of < <' (Double> ) > > ), Nullable< (Of < <' (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 | (Herdado de Object.) | |
Finalize | (Herdado de Object.) | |
GetHashCode | (Herdado de Object.) | |
GetType | (Herdado de Object.) | |
MemberwiseClone | (Herdado de Object.) | |
SetSrid | Sets the Spatial Reference Identifier (SRID) for a geometry type call sequence. | |
ToString | (Herdado de Object.) |
Início
Comentários
Throws FormatException for an invalid call sequence or when a call sequence is incomplete when ConstructedGeometry() is invoked.
Exemplos
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();
Segurança de thread
Qualquer membro público static (Shared no Visual Basic) desse tipo é seguro para threads. Não há garantia de que qualquer membro de instância seja seguro para threads.