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

SqlGeometry Class

 

Applies To: SQL Server 2016 Preview

The SqlGeometry type represents data in a Euclidean (flat) coordinate system.

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

System.Object
  Microsoft.SqlServer.Types.SqlGeometry

[SerializableAttribute]
[SqlUserDefinedTypeAttribute(Format.UserDefined, IsByteOrdered = false, 
	MaxByteSize = -1, IsFixedLength = false)]
[CLSCompliantAttribute(true)]
public sealed class SqlGeometry : INullable, IBinarySerialize, 
	ISqlSpatialGridIndexable

NameDescription
System_CAPS_pubmethodSqlGeometry()

Initializes a new instance of the SqlGeometry class.

NameDescription
System_CAPS_pubpropertyHasM

Returns true if at least one point in a spatial object contains value M; otherwise returns false. This property is read-only.

System_CAPS_pubpropertyHasZ

Returns true if at least one point in a spatial object contains value Z; otherwise returns false. This property is read-only.

System_CAPS_pubpropertyIsNull

Gets a value that indicates whether the SqlGeometry object is null.

System_CAPS_pubpropertyM

Gets the M (measure) value of the SqlGeometry instance. The semantics of the measure value are user-defined.

System_CAPS_pubpropertySystem_CAPS_staticNull

Gets a read-only property providing a null instance of the SqlGeometry type.

System_CAPS_pubpropertySTSrid

Gets or sets an integer that represents the Spatial Reference Identifier (SRID) of the instance.

System_CAPS_pubpropertySTX

Gets the X-coordinate property of a Point instance.

System_CAPS_pubpropertySTY

Gets the Y-coordinate property of a Point instance.

System_CAPS_pubpropertyZ

Gets the Z (elevation) value of the instance. The semantics of the elevation value are user-defined.

NameDescription
System_CAPS_pubmethodAsBinaryZM()

Returns the Elevation and Measure as a binary.

System_CAPS_pubmethodAsGml()

Returns the Geography Markup Language (GML) representation of a SqlGeometry instance.

System_CAPS_pubmethodAsTextZM()

Returns the Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a SqlGeometry instance, augmented with any Z (elevation) and M (measure) values carried by the instance.

System_CAPS_pubmethodBufferWithCurves(Double)

Buffers the geometry objects with curves.

System_CAPS_pubmethodBufferWithTolerance(Double, Double, Boolean)

Returns a geometric object that represents the union of all point values whose distance from a SqlGeometry instance is less than or equal to a specified value, allowing for a specified tolerance.

System_CAPS_pubmethodCurveToLineWithTolerance(Double, Boolean)

Returns a polygonal approximation of a SqlGeometry instance that contains circular arc segments.

System_CAPS_pubmethodSystem_CAPS_staticDeserialize(SqlBytes)

Returns a constructed SqlGeometry from an internal SQL Server format for spatial data.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodFilter(SqlGeometry)

Offers a fast, index-only intersection method to determine if a SqlGeometry instance intersects another SqlGeometry instance, assuming an index is available.

System_CAPS_pubmethodSystem_CAPS_staticGeomFromGml(SqlXml, Int32)

Constructs a SqlGeometry instance given a representation in the SQL Server subset of the Geography Markup Language (GML).

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodInstanceOf(String)

Tests if the SqlGeometry instance is the same as the specified type.

System_CAPS_pubmethodIsValidDetailed()

Returns a message to help identify validity issues with a spatial object.

System_CAPS_pubmethodMakeValid()

Converts an invalid SqlGeometry instance into a SqlGeometry instance with a valid Open Geospatial Consortium (OGC) type.

System_CAPS_pubmethodMinDbCompatibilityLevel()

Returns the minimum database compatibility that accepts the SqlGeometry type.

System_CAPS_pubmethodSystem_CAPS_staticParse(SqlString)

Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation.

System_CAPS_pubmethodSystem_CAPS_staticPoint(Double, Double, Int32)

Constructs a SqlGeometry instance that represents a Point instance from its X and Y values and an SRID.

System_CAPS_pubmethodPopulate(IGeometrySink)

Obsolete.Applies a geometry type call sequence to an IGeometrySink object. The call sequence is a sequential set of figures, lines, and points. SqlGeometry

System_CAPS_pubmethodPopulate(IGeometrySink110)

Applies a geometry type call sequence to IGeometrySink object.

System_CAPS_pubmethodRead(BinaryReader)

Reads a binary representation of a geometry type into a SqlGeometry object. SqlGeometry

System_CAPS_pubmethodReduce(Double)

Returns an approximation of the given SqlGeometry instance produced by running the Douglas-Peucker algorithm on the instance with the given tolerance.

System_CAPS_pubmethodSerialize()

Returns the bytes that represent an internal SQL Server format of SqlGeometry type.

System_CAPS_pubmethodShortestLineTo(SqlGeometry)

Returns the shortest distance between the two SqlGeometryinstances.

System_CAPS_pubmethodSTArea()

Returns the total surface area of a SqlGeometry instance.

System_CAPS_pubmethodSTAsBinary()

Returns the Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation of a SqlGeometry instance. This value will not contain any Z or M values carried by the instance.

System_CAPS_pubmethodSTAsText()

Returns the Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a SqlGeometry instance. This text will not contain any Z (elevation) or M (measure) values carried by the instance.

System_CAPS_pubmethodSTBoundary()

Returns the boundary of a SqlGeometry instance.

System_CAPS_pubmethodSTBuffer(Double)

Returns a geometric object that represents the union of all points whose distance from a SqlGeometry instance is less than or equal to a specified value.

System_CAPS_pubmethodSTCentroid()

Returns the geometric center of a SqlGeometry instance consisting of one or more polygons.

System_CAPS_pubmethodSTContains(SqlGeometry)

Specifies whether the calling SqlGeometry instance completely contains another SqlGeometry.

System_CAPS_pubmethodSTConvexHull()

Returns an object that represents the convex hull of a SqlGeometry instance.

System_CAPS_pubmethodSTCrosses(SqlGeometry)

Determines whether the calling SqlGeometry instance crosses the specified SqlGeometry instance.

System_CAPS_pubmethodSTCurveN(Int32)

Returns the curve specified from a SqlGeometry instance that is a LineString, CircularString, or CompoundCurve.

System_CAPS_pubmethodSTCurveToLine()

Returns a polygonal approximation of a SqlGeometry instance that contains circular arc segments.

System_CAPS_pubmethodSTDifference(SqlGeometry)

Returns an object that represents the points from one SqlGeometry instance that do not lie within another SqlGeometry instance.

System_CAPS_pubmethodSTDimension()

Returns the maximum dimension of a SqlGeometry instance.

System_CAPS_pubmethodSTDisjoint(SqlGeometry)

Determines whether the calling SqlGeometry instance is disjointed when compared against the specified SqlGeometry.

System_CAPS_pubmethodSTDistance(SqlGeometry)

Returns the shortest distance between a point in a SqlGeometry instance and a point in the specified SqlGeometry instance.

System_CAPS_pubmethodSTEndPoint()

Returns the end point of a SqlGeometry instance.

System_CAPS_pubmethodSTEnvelope()

Returns the minimum axis-aligned bounding rectangle of the instance.

System_CAPS_pubmethodSTEquals(SqlGeometry)

Determines whether the specified SqlGeometry has a point set identical to the calling SqlGeometry.

System_CAPS_pubmethodSTExteriorRing()

Returns the exterior ring of a SqlGeometry instance that is a polygon.

System_CAPS_pubmethodSystem_CAPS_staticSTGeomCollFromText(SqlChars, Int32)

Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation augmented with any Z (elevation) and M (measure) values carried by the instance.

System_CAPS_pubmethodSystem_CAPS_staticSTGeomCollFromWKB(SqlBytes, Int32)

Returns a SqlGeometry collection instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSTGeometryN(Int32)

Returns the specified SqlGeometry in a SqlGeometry collection.

System_CAPS_pubmethodSTGeometryType()

Returns the Open Geospatial Consortium (OGC) type name represented by a geometry instance. SqlGeometry

System_CAPS_pubmethodSystem_CAPS_staticSTGeomFromText(SqlChars, Int32)

Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation augmented with any Z (elevation) and M (measure) values carried by the instance.

System_CAPS_pubmethodSystem_CAPS_staticSTGeomFromWKB(SqlBytes, Int32)

Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSTInteriorRingN(Int32)

Returns the specified interior ring of a Polygon SqlGeometry instance.

System_CAPS_pubmethodSTIntersection(SqlGeometry)

Returns an object that represents the points where a SqlGeometry instance intersects another SqlGeometry instance.

System_CAPS_pubmethodSTIntersects(SqlGeometry)

Determines whether the calling SqlGeometry instance intersects another SqlGeometry.

System_CAPS_pubmethodSTIsClosed()

Determines whether the start and end points of the calling SqlGeometry are the same.

System_CAPS_pubmethodSTIsEmpty()

Indicates whether the calling SqlGeometry instance is empty.

System_CAPS_pubmethodSTIsRing()

Determines whether the calling SqlGeometry instance is a ring.

System_CAPS_pubmethodSTIsSimple()

Determines whether the calling SqlGeometry instance is simple.

System_CAPS_pubmethodSTIsValid()

Determines whether the SqlGeometry instance is well-formed.

System_CAPS_pubmethodSTLength()

Returns the total length of the elements in a SqlGeometry instance.

System_CAPS_pubmethodSystem_CAPS_staticSTLineFromText(SqlChars, Int32)

Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation augmented with any Z (elevation) and M (measure) values carried by the instance.

System_CAPS_pubmethodSystem_CAPS_staticSTLineFromWKB(SqlBytes, Int32)

Returns a SqlGeometry LineString instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSystem_CAPS_staticSTMLineFromText(SqlChars, Int32)

Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation augmented with any Z (elevation) and M (measure) values carried by the instance.

System_CAPS_pubmethodSystem_CAPS_staticSTMLineFromWKB(SqlBytes, Int32)

Returns a SqlGeometry MultiLineString instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSystem_CAPS_staticSTMPointFromText(SqlChars, Int32)

Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation augmented with any Z (elevation) and M (measure) values carried by the instance.

System_CAPS_pubmethodSystem_CAPS_staticSTMPointFromWKB(SqlBytes, Int32)

Returns a SqlGeometry Point instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSystem_CAPS_staticSTMPolyFromText(SqlChars, Int32)

Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation with any Z (elevation) and M (measure) values carried by the instance.

System_CAPS_pubmethodSystem_CAPS_staticSTMPolyFromWKB(SqlBytes, Int32)

Returns a SqlGeometry MultiPolygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSTNumCurves()

Returns the number of curves in a one-dimensional SqlGeometry instance.

System_CAPS_pubmethodSTNumGeometries()

Returns the number of SqlGeometry that comprise a SqlGeometry instance.

System_CAPS_pubmethodSTNumInteriorRing()

Returns the number of interior rings of a Polygon SqlGeometry instance.

System_CAPS_pubmethodSTNumPoints()

Returns the sum of the number of points in each of the figures in a SqlGeometry instance.

System_CAPS_pubmethodSTOverlaps(SqlGeometry)

Determines whether the specified SqlGeometry overlaps the current SqlGeometry.

System_CAPS_pubmethodSystem_CAPS_staticSTPointFromText(SqlChars, Int32)

Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation augmented with any Z (elevation) and M (measure) values carried by the instance.

System_CAPS_pubmethodSystem_CAPS_staticSTPointFromWKB(SqlBytes, Int32)

Returns a SqlGeometry Point instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSTPointN(Int32)

Returns a specified point in a SqlGeometry instance.

System_CAPS_pubmethodSTPointOnSurface()

Returns an arbitrary point located within the interior of a SqlGeometry instance.

System_CAPS_pubmethodSystem_CAPS_staticSTPolyFromText(SqlChars, Int32)

Returns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation augmented with any Z (elevation) and M (measure) values carried by the instance.

System_CAPS_pubmethodSystem_CAPS_staticSTPolyFromWKB(SqlBytes, Int32)

Returns a SqlGeometry Polygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSTRelate(SqlGeometry, String)

Determines whether the calling SqlGeometry is related to the specified SqlGeometry.

System_CAPS_pubmethodSTStartPoint()

Returns the start point of a SqlGeometry instance.

System_CAPS_pubmethodSTSymDifference(SqlGeometry)

Returns an object that represents all points that are either in one SqlGeometry instance or another SqlGeometry instance, but not those points that lie in both instances.

System_CAPS_pubmethodSTTouches(SqlGeometry)

Determines whether the specified SqlGeometry touches the current SqlGeometry.

System_CAPS_pubmethodSTUnion(SqlGeometry)

Returns an object that represents the union of a SqlGeometry instance with another SqlGeometry instance.

System_CAPS_pubmethodSTWithin(SqlGeometry)

Determines whether the current SqlGeometry is completely within the specified SqlGeometry instance.

System_CAPS_pubmethodToString()

Returns the Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a SqlGeometry instance augmented with any Z (elevation) and M (measure) values carried by the instance. (Overrides Object.ToString().)

System_CAPS_pubmethodWrite(BinaryWriter)

Writes a SqlGeometry instance to a binary stream. SqlGeometry

SQL Server 2016 supports a set of methods for the geometry spatial data type. These methods include methods on geometry that are defined by the Open Geospatial Consortium (OGC) standard and a set of Microsoft extensions to that standard.

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