Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

SqlGeometry Class

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

System.Object
  Microsoft.SqlServer.Types.SqlGeometry

Namespace:  Microsoft.SqlServer.Types
Assembly:  Microsoft.SqlServer.Types (in Microsoft.SqlServer.Types.dll)
[SerializableAttribute]
[SqlUserDefinedTypeAttribute(Format.UserDefined, IsByteOrdered = false, 
	MaxByteSize = , IsFixedLength = false)]
[CLSCompliantAttribute(true)]
public sealed class SqlGeometry : INullable, 
	IBinarySerialize, ISqlSpatialGridIndexable

The SqlGeometry type exposes the following members.

  NameDescription
Public methodSqlGeometryInitializes a new instance of the SqlGeometry class.
Top
  NameDescription
Public propertyHasMReturns true if at least one point in a spatial object contains value M; otherwise returns false. This property is read-only.
Public propertyHasZReturns true if at least one point in a spatial object contains value Z; otherwise returns false. This property is read-only.
Public propertyIsNullGets a value that indicates whether the SqlGeometry object is null.
Public propertyMGets the M (measure) value of the SqlGeometry instance. The semantics of the measure value are user-defined.
Public propertyStatic memberNullGets a read-only property providing a null instance of the SqlGeometry type.
Public propertySTSridGets or sets an integer that represents the Spatial Reference Identifier (SRID) of the instance.
Public propertySTXGets the X-coordinate property of a Point instance.
Public propertySTYGets the Y-coordinate property of a Point instance.
Public propertyZGets the Z (elevation) value of the instance. The semantics of the elevation value are user-defined.
Top
  NameDescription
Public methodAsBinaryZMReturns the Elevation and Measure as a binary.
Public methodAsGmlReturns the Geography Markup Language (GML) representation of a SqlGeometry instance.
Public methodAsTextZMReturns 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.
Public methodBufferWithCurvesBuffers the geometry objects with curves.
Public methodBufferWithToleranceReturns 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.
Public methodCurveToLineWithToleranceReturns a polygonal approximation of a SqlGeometry instance that contains circular arc segments.
Public methodStatic memberDeserializeReturns a constructed SqlGeometry from an internal SQL Server format for spatial data.
Public methodEquals (Inherited from Object.)
Public methodFilterOffers a fast, index-only intersection method to determine if a SqlGeometry instance intersects another SqlGeometry instance, assuming an index is available.
Protected methodFinalize (Inherited from Object.)
Public methodStatic memberGeomFromGmlConstructs a SqlGeometry instance given a representation in the SQL Server subset of the Geography Markup Language (GML).
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInstanceOfTests if the SqlGeometry instance is the same as the specified type.
Public methodIsValidDetailedReturns a message to help identify validity issues with a spatial object.
Public methodMakeValidConverts an invalid SqlGeometry instance into a SqlGeometry instance with a valid Open Geospatial Consortium (OGC) type.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodMinDbCompatibilityLevelReturns the minimum database compatibility that accepts the SqlGeometry type.
Public methodStatic memberParseReturns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation.
Public methodStatic memberPointConstructs a SqlGeometry instance that represents a Point instance from its X and Y values and an SRID.
Public methodPopulate(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
Public methodPopulate(IGeometrySink110)Applies a geometry type call sequence to IGeometrySink object.
Public methodReadReads a binary representation of a geometry type into a SqlGeometry object. SqlGeometry
Public methodReduceReturns an approximation of the given SqlGeometry instance produced by running the Douglas-Peucker algorithm on the instance with the given tolerance.
Public methodSerializeReturns the bytes that represent an internal SQL Server format of SqlGeometry type.
Public methodShortestLineToReturns the shortest distance between the two SqlGeometryinstances.
Public methodSTAreaReturns the total surface area of a SqlGeometry instance.
Public methodSTAsBinaryReturns 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.
Public methodSTAsTextReturns 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.
Public methodSTBoundaryReturns the boundary of a SqlGeometry instance.
Public methodSTBufferReturns 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.
Public methodSTCentroidReturns the geometric center of a SqlGeometry instance consisting of one or more polygons.
Public methodSTContainsSpecifies whether the calling SqlGeometry instance completely contains another SqlGeometry.
Public methodSTConvexHullReturns an object that represents the convex hull of a SqlGeometry instance.
Public methodSTCrossesDetermines whether the calling SqlGeometry instance crosses the specified SqlGeometry instance.
Public methodSTCurveNReturns the curve specified from a SqlGeometry instance that is a LineString, CircularString, or CompoundCurve.
Public methodSTCurveToLineReturns a polygonal approximation of a SqlGeometry instance that contains circular arc segments.
Public methodSTDifferenceReturns an object that represents the points from one SqlGeometry instance that do not lie within another SqlGeometry instance.
Public methodSTDimensionReturns the maximum dimension of a SqlGeometry instance.
Public methodSTDisjointDetermines whether the calling SqlGeometry instance is disjointed when compared against the specified SqlGeometry.
Public methodSTDistanceReturns the shortest distance between a point in a SqlGeometry instance and a point in the specified SqlGeometry instance.
Public methodSTEndPointReturns the end point of a SqlGeometry instance.
Public methodSTEnvelopeReturns the minimum axis-aligned bounding rectangle of the instance.
Public methodSTEqualsDetermines whether the specified SqlGeometry has a point set identical to the calling SqlGeometry.
Public methodSTExteriorRingReturns the exterior ring of a SqlGeometry instance that is a polygon.
Public methodStatic memberSTGeomCollFromTextReturns 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.
Public methodStatic memberSTGeomCollFromWKBReturns a SqlGeometry collection instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodSTGeometryNReturns the specified SqlGeometry in a SqlGeometry collection.
Public methodSTGeometryTypeReturns the Open Geospatial Consortium (OGC) type name represented by a geometry instance. SqlGeometry
Public methodStatic memberSTGeomFromTextReturns 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.
Public methodStatic memberSTGeomFromWKBReturns a SqlGeometry instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodSTInteriorRingNReturns the specified interior ring of a Polygon SqlGeometry instance.
Public methodSTIntersectionReturns an object that represents the points where a SqlGeometry instance intersects another SqlGeometry instance.
Public methodSTIntersectsDetermines whether the calling SqlGeometry instance intersects another SqlGeometry.
Public methodSTIsClosedDetermines whether the start and end points of the calling SqlGeometry are the same.
Public methodSTIsEmptyIndicates whether the calling SqlGeometry instance is empty.
Public methodSTIsRingDetermines whether the calling SqlGeometry instance is a ring.
Public methodSTIsSimpleDetermines whether the calling SqlGeometry instance is simple.
Public methodSTIsValidDetermines whether the SqlGeometry instance is well-formed.
Public methodSTLengthReturns the total length of the elements in a SqlGeometry instance.
Public methodStatic memberSTLineFromTextReturns 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.
Public methodStatic memberSTLineFromWKBReturns a SqlGeometry LineString instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodStatic memberSTMLineFromTextReturns 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.
Public methodStatic memberSTMLineFromWKBReturns a SqlGeometry MultiLineString instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodStatic memberSTMPointFromTextReturns 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.
Public methodStatic memberSTMPointFromWKBReturns a SqlGeometry Point instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodStatic memberSTMPolyFromTextReturns 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.
Public methodStatic memberSTMPolyFromWKBReturns a SqlGeometry MultiPolygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodSTNumCurvesReturns the number of curves in a one-dimensional SqlGeometry instance.
Public methodSTNumGeometriesReturns the number of SqlGeometry that comprise a SqlGeometry instance.
Public methodSTNumInteriorRingReturns the number of interior rings of a Polygon SqlGeometry instance.
Public methodSTNumPointsReturns the sum of the number of points in each of the figures in a SqlGeometry instance.
Public methodSTOverlapsDetermines whether the specified SqlGeometry overlaps the current SqlGeometry.
Public methodStatic memberSTPointFromTextReturns 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.
Public methodStatic memberSTPointFromWKBReturns a SqlGeometry Point instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodSTPointNReturns a specified point in a SqlGeometry instance.
Public methodSTPointOnSurfaceReturns an arbitrary point located within the interior of a SqlGeometry instance.
Public methodStatic memberSTPolyFromTextReturns 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.
Public methodStatic memberSTPolyFromWKBReturns a SqlGeometry Polygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodSTRelateDetermines whether the calling SqlGeometry is related to the specified SqlGeometry.
Public methodSTStartPointReturns the start point of a SqlGeometry instance.
Public methodSTSymDifferenceReturns 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.
Public methodSTTouchesDetermines whether the specified SqlGeometry touches the current SqlGeometry.
Public methodSTUnionReturns an object that represents the union of a SqlGeometry instance with another SqlGeometry instance.
Public methodSTWithinDetermines whether the current SqlGeometry is completely within the specified SqlGeometry instance.
Public methodToStringReturns 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().)
Public methodWriteWrites a SqlGeometry instance to a binary stream. SqlGeometry
Top
  NameDescription
Explicit interface implemetationPrivate methodISqlSpatialGridIndexable.BufferForDistanceQueryReturns the buffer for distance query for the SQL Geometry.
Explicit interface implemetationPrivate methodISqlSpatialGridIndexable.GetBoundingBoxCornersReturns a value for the bounding box corners for the SQL Geometry.
Explicit interface implemetationPrivate methodISqlSpatialGridIndexable.GetGridCoverageReturns the grid coverage of the SQL Geometry.
Explicit interface implemetationPrivate methodISqlSpatialGridIndexable.InteriorBufferForDistanceQueryGets the interior buffer for distance query for the SQL Geometry.
Top

SQL Server 2012 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.

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.