Export (0) Print
Expand All

SqlGeography Class

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

System.Object
  Microsoft.SqlServer.Types.SqlGeography

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

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

The SqlGeography type exposes the following members.

  NameDescription
Public methodSqlGeographyInitializes a new instance of the SqlGeography class.
Top

  NameDescription
Public propertyIsNullDetermines whether the SqlGeography instance is null.
Public propertyLatReturns the latitude property of the geography instance.
Public propertyLongReturns the longitude property of the geography instance.
Public propertyMReturns the M (measure) value of the geography instance.
Public propertyStatic memberNullReturns a read-only property providing a null instance of the SqlGeography type.
Public propertySTSridGets or sets id is an integer representing the Spatial Reference Identifier (SRID) of the instance.
Public propertyZGets the Z (elevation) value of the instance. The semantics of the elevation value are user-defined.
Top

  NameDescription
Public methodAsGmlReturns the Geography Markup Language (GML) representation of a SqlGeography instance.
Public methodAsTextZMReturns 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.
Public methodBufferWithToleranceReturns 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.
Public methodEnvelopeAngleReturns the maximum angle between the point returned by the EnvelopeCenter method and a point in the geography instance in degrees.
Public methodEnvelopeCenterReturns a point that can be used as the center of a bounding circle for the geography instance.
Public methodEquals (Inherited from Object.)
Public methodFilterOffers a fast, index-only intersection method to determine if a geography instance intersects another SqlGeography instance, assuming an index is available.
Protected methodFinalize (Inherited from Object.)
Public methodStatic memberGeomFromGmlConstructs a SqlGeography 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 SqlGeography instance is the same as the specified type.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodNumRingsReturns the total number of rings in a Polygon instance.
Public methodStatic memberParseReturns a SqlGeography instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation.
Public methodStatic memberPointConstructs a SqlGeography instance representing a Point instance from its x and y values and a spatial reference ID (SRID).
Public methodPopulateApplies a geography type call sequence to IGeographySink object. The call sequence is a set of figures, lines, and points for geography types.
Public methodReadReads a binary representation of a geography type into a SqlGeometry object.
Public methodReduceReturns an approximation of the given geography instance produced by running the Douglas-Peucker algorithm on the instance with the given tolerance.
Public methodRingNReturns the specified ring of the SqlGeography instance: 1 ≤ n ≤ NumRings().
Public methodSTAreaReturns the total surface area of a SqlGeography instance.
Public methodSTAsBinaryReturns the Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation of a SqlGeography instance.
Public methodSTAsTextReturns the Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a SqlGeography instance.
Public methodSTBufferReturns 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.
Public methodSTDifferenceReturns an object representing the points from one SqlGeography instance that do not lie within another SqlGeography instance.
Public methodSTDimensionReturns the maximum dimension of a SqlGeography instance
Public methodSTDisjointDetermines whether the calling SqlGeography instance is spatially disjoint from the specified SqlGeography instance.
Public methodSTDistanceReturns the shortest distance between a point in a SqlGeography instance and a point in another SqlGeography instance.
Public methodSTEndPointReturns the end point of a SqlGeography instance.
Public methodSTEqualsDetermines whether the specified SqlGeography instance has the same point set as the calling SqlGeography instance.
Public methodStatic memberSTGeomCollFromTextReturns 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.
Public methodStatic memberSTGeomCollFromWKBReturns a GeometryCollection instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodSTGeometryNReturns a specified geography element in a GeometryCollection or one of its subtypes.
Public methodSTGeometryTypeReturns the Open Geospatial Consortium (OGC) type name represented by a geography instance.
Public methodStatic memberSTGeomFromTextReturns 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.
Public methodStatic memberSTGeomFromWKBReturns a SqlGeography instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodSTIntersectionReturns an object representing the points where a SqlGeography instance intersects another SqlGeography instance.
Public methodSTIntersectsDetermines whether the current SqlGeography instance intersects with the specified SqlGeography.
Public methodSTIsClosedDetermines whether the calling SqlGeography instance is closed.
Public methodSTIsEmptyDetermines whether the SqlGeography instance is empty.
Public methodSTLengthReturns the total length of the elements in a SqlGeography instance or the SqlGeography instances within a GeometryCollection.
Public methodStatic memberSTLineFromTextReturns 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.
Public methodStatic memberSTLineFromWKBReturns 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.
Public methodStatic memberSTMLineFromTextReturns 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.
Public methodStatic memberSTMLineFromWKBReturns a SqlGeography MultiLineString instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodStatic memberSTMPointFromTextReturns 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.
Public methodStatic memberSTMPointFromWKBReturns a SqlGeography MultiPoint instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodStatic memberSTMPolyFromTextReturns 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.
Public methodStatic memberSTMPolyFromWKBReturns a SqlGeography MultiPolygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodSTNumGeometriesReturns the number of geometries that make up a SqlGeography instance.
Public methodSTNumPointsReturns the total number of points in each of the figures in a SqlGeography instance
Public methodStatic memberSTPointFromTextReturns 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.
Public methodStatic memberSTPointFromWKBReturns a SqlGeography Point instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodSTPointNReturns the specified point in a SqlGeography instance.
Public methodStatic memberSTPolyFromTextReturns 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.
Public methodStatic memberSTPolyFromWKBReturns a SqlGeography Polygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation.
Public methodSTStartPointReturns the start point of a SqlGeography instance.
Public methodSTSymDifferenceReturns 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.
Public methodSTUnionReturns an object representing the union of a SqlGeography instance with another SqlGeography instance.
Public methodToStringReturns 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().)
Public methodWriteWrites a SqlGeography object to a binary stream.
Top

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

Community Additions

ADD
Show:
© 2014 Microsoft