Export (0) Print
Expand All

SqlGeography Class

 

Applies To: SQL Server 2016 Preview

The SqlGeography type represents data in a geodetic (round earth) coordinate system.

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

System.Object
  Microsoft.SqlServer.Types.SqlGeography

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

NameDescription
System_CAPS_pubmethodSqlGeography()

Initializes a new instance of the SqlGeography 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

Determines whether the SqlGeography instance is null.

System_CAPS_pubpropertyLat

Returns the latitude property of the geography instance.

System_CAPS_pubpropertyLong

Returns the longitude property of the geography instance.

System_CAPS_pubpropertyM

Returns the M (measure) value of the geography instance.

System_CAPS_pubpropertySystem_CAPS_staticNull

Returns a read-only property providing a null instance of the SqlGeography type.

System_CAPS_pubpropertySTSrid

Gets or sets id is an integer representing the Spatial Reference Identifier (SRID) of the 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 Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation of a SqlGeography instance augmented with any Z (elevation) and M (measure) values carried by the instance.

System_CAPS_pubmethodAsGml()

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

System_CAPS_pubmethodAsTextZM()

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

System_CAPS_pubmethodBufferWithCurves(Double)

Returns a SqlGeography instance that represents the set of all points whose distance from the calling SqlGeography instance is less than or equal to the distance parameter.

System_CAPS_pubmethodBufferWithTolerance(Double, Double, Boolean)

Returns a geometric object representing the union of all point values whose distance from a SqlGeography 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 SqlGeography 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. Can be used for sending spatial data over the network or reading them from files.

System_CAPS_pubmethodEnvelopeAngle()

Returns the maximum angle between the point returned by EnvelopeCenter and a point in the SqlGeography instance in degrees.

System_CAPS_pubmethodEnvelopeCenter()

Returns a point that can be used as the center of a bounding circle for the geography instance.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodFilter(SqlGeography)

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

System_CAPS_pubmethodSystem_CAPS_staticGeomFromGml(SqlXml, Int32)

Constructs a SqlGeography 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 SqlGeography 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 a geography instance that is not valid into a valid geography instance with a valid Open Geospatial Consortium (OGC) type.

System_CAPS_pubmethodMinDbCompatibilityLevel()

Returns the minimum database compatibility that accepts the SqlGeography type.

System_CAPS_pubmethodNumRings()

Returns the total number of rings in a Polygon instance.

System_CAPS_pubmethodSystem_CAPS_staticParse(SqlString)

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

System_CAPS_pubmethodSystem_CAPS_staticPoint(Double, Double, Int32)

Constructs a SqlGeography instance representing a Point instance from its x and y values and a spatial reference ID (SRID).

System_CAPS_pubmethodPopulate(IGeographySink)

Obsolete.Applies a geography type call sequence to IGeographySink object. The call sequence is a set of figures, lines, and points for geography types.

System_CAPS_pubmethodPopulate(IGeographySink110)

Applies a geography type call sequence to IGeographySink object.

System_CAPS_pubmethodRead(BinaryReader)

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

System_CAPS_pubmethodReduce(Double)

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

System_CAPS_pubmethodReorientObject()

Returns a geography instance with interchanged interior regions and exterior regions.

System_CAPS_pubmethodRingN(Int32)

Returns the specified ring of the SqlGeography instance: 1 ≤ n ≤ NumRings().

System_CAPS_pubmethodSerialize()

Used for sending spatial data across the network.

System_CAPS_pubmethodShortestLineTo(SqlGeography)

Returns the shortest distance between the two SqlGeographyinstances.

System_CAPS_pubmethodSTArea()

Returns the total surface area of a SqlGeography instance.

System_CAPS_pubmethodSTAsBinary()

Returns the Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation of a SqlGeography instance.

System_CAPS_pubmethodSTAsText()

Returns the Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a SqlGeography instance.

System_CAPS_pubmethodSTBuffer(Double)

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

System_CAPS_pubmethodSTContains(SqlGeography)

Specifies whether the calling SqlGeography instance spatially contains the SqlGeography instance passed to the method.

System_CAPS_pubmethodSTConvexHull()

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

System_CAPS_pubmethodSTCurveN(Int32)

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

System_CAPS_pubmethodSTCurveToLine()

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

System_CAPS_pubmethodSTDifference(SqlGeography)

Returns an object representing the points from one SqlGeography instance that do not lie within another SqlGeography instance.

System_CAPS_pubmethodSTDimension()

Returns the maximum dimension of a SqlGeography instance

System_CAPS_pubmethodSTDisjoint(SqlGeography)

Determines whether the calling SqlGeography instance is spatially disjoint from the specified SqlGeography instance.

System_CAPS_pubmethodSTDistance(SqlGeography)

Returns the shortest distance between a point in a SqlGeography instance and a point in another SqlGeography instance.

System_CAPS_pubmethodSTEndPoint()

Returns the end point of a SqlGeography instance.

System_CAPS_pubmethodSTEquals(SqlGeography)

Determines whether the specified SqlGeography instance has the same point set as the calling SqlGeography instance.

System_CAPS_pubmethodSystem_CAPS_staticSTGeomCollFromText(SqlChars, Int32)

Returns a geography 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 GeometryCollection instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSTGeometryN(Int32)

Returns a specified geography element in a GeometryCollection or one of its subtypes.

System_CAPS_pubmethodSTGeometryType()

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

System_CAPS_pubmethodSystem_CAPS_staticSTGeomFromText(SqlChars, Int32)

Returns a SqlGeography 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 SqlGeography instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSTIntersection(SqlGeography)

Returns an object representing the points where a SqlGeography instance intersects another SqlGeography instance.

System_CAPS_pubmethodSTIntersects(SqlGeography)

Determines whether the current SqlGeography instance intersects with the specified SqlGeography.

System_CAPS_pubmethodSTIsClosed()

Determines whether the calling SqlGeography instance is closed.

System_CAPS_pubmethodSTIsEmpty()

Determines whether the SqlGeography instance is empty.

System_CAPS_pubmethodSTIsValid()

Specifies whether a geography instance is well-formed and recognized as a valid geography object based on its Open Geospatial Consortium (OGC) type.

System_CAPS_pubmethodSTLength()

Returns the total length of the elements in a SqlGeography instance or the SqlGeography instances within a GeometryCollection.

System_CAPS_pubmethodSystem_CAPS_staticSTLineFromText(SqlChars, Int32)

Returns a SqlGeography 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 SqlGeography 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_staticSTMLineFromText(SqlChars, Int32)

Returns a SqlGeography 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 SqlGeography MultiLineString instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSystem_CAPS_staticSTMPointFromText(SqlChars, Int32)

Returns a SqlGeography 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 SqlGeography MultiPoint instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSystem_CAPS_staticSTMPolyFromText(SqlChars, Int32)

Returns a SqlGeography 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_staticSTMPolyFromWKB(SqlBytes, Int32)

Returns a SqlGeography 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 SqlGeography instance.

System_CAPS_pubmethodSTNumGeometries()

Returns the number of geometries that make up a SqlGeography instance.

System_CAPS_pubmethodSTNumPoints()

Returns the total number of points in each of the figures in a SqlGeography instance

System_CAPS_pubmethodSTOverlaps(SqlGeography)

Returns 1 if a SqlGeography instance spatially overlaps another SqlGeography instance, or 0 if it does not.

System_CAPS_pubmethodSystem_CAPS_staticSTPointFromText(SqlChars, Int32)

Returns a SqlGeography 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 SqlGeography Point instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSTPointN(Int32)

Returns the specified point in a SqlGeography instance.

System_CAPS_pubmethodSystem_CAPS_staticSTPolyFromText(SqlChars, Int32)

Returns a SqlGeography 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 SqlGeography Polygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.

System_CAPS_pubmethodSTStartPoint()

Returns the start point of a SqlGeography instance.

System_CAPS_pubmethodSTSymDifference(SqlGeography)

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

System_CAPS_pubmethodSTUnion(SqlGeography)

Returns an object representing the union of a SqlGeography instance with another SqlGeography instance.

System_CAPS_pubmethodSTWithin(SqlGeography)

Returns 1 if a SqlGeography instance is spatially within another SqlGeography instance; otherwise, returns 0.

System_CAPS_pubmethodToString()

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

System_CAPS_pubmethodWrite(BinaryWriter)

Writes a SqlGeography object to a binary stream.

SQL Server supports a set of methods for the geography spatial data type. These methods include methods on geography 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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft