Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

SqlGeometryBuilder Class

 

Applies To: SQL Server 2016 Preview

Constructs instances of SqlGeometry objects by using IGeometrySink interface.

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

System.Object
  Microsoft.SqlServer.Types.SqlGeometryBuilder

[<CLSCompliantAttribute(true)>]
type SqlGeometryBuilder = 
    class
        interface IGeometrySink110
        interface IGeometrySink
    end

NameDescription
System_CAPS_pubmethodSqlGeometryBuilder()

Constructs a SqlGeometryBuilder object.

NameDescription
System_CAPS_pubpropertyConstructedGeometry

Retrieves constructed spatial geometry 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 geometry type figure.

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

Constructs additional points in the call sequence for a geometry type.

System_CAPS_pubmethodBeginFigure(Double, Double)

Starts the call sequence for a geometry figure.

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

Starts the call sequence for a geometry figure.

System_CAPS_pubmethodBeginGeometry(OpenGisGeometryType)

Initializes a call sequence for a geometry type.

System_CAPS_pubmethodEndFigure()

Finishes a call sequence for a geometry figure.

System_CAPS_pubmethodEndGeometry()

Finishes a call sequence for a geometry 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 geometry type call sequence.

System_CAPS_pubmethodToString()

(Inherited from Object.)

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

Legacy Code Example

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

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

Community Additions

Show:
© 2015 Microsoft