SqlGeography
SqlGeography
SqlGeography
Class
Definition
The SqlGeography type represents data in a geodetic (round earth) coordinate system.
[Microsoft.SqlServer.Server.SqlUserDefinedType(Microsoft.SqlServer.Server.Format.UserDefined, IsByteOrdered=false, IsFixedLength=false, MaxByteSize=-1)]
[System.CLSCompliant(true)]
[Serializable]
public sealed class SqlGeography : Microsoft.SqlServer.Server.IBinarySerialize, Microsoft.SqlServer.Types.ISqlSpatialGridIndexable, System.Data.SqlTypes.INullable
type SqlGeography = class
interface INullable
interface IBinarySerialize
interface ISqlSpatialGridIndexable
Public NotInheritable Class SqlGeography
Implements IBinarySerialize, INullable, ISqlSpatialGridIndexable
- Inheritance
- Attributes
- Implements
Constructors
SqlGeography() SqlGeography() SqlGeography() |
Initializes a new instance of the SqlGeography class. |
Properties
HasM HasM HasM |
Returns true if at least one point in a spatial object contains value M; otherwise returns false. This property is read-only. |
HasZ HasZ HasZ |
Returns true if at least one point in a spatial object contains value Z; otherwise returns false. This property is read-only. |
IsNull IsNull IsNull |
Determines whether the SqlGeography instance is null. |
Lat Lat Lat |
Returns the latitude property of the geography instance. |
Long Long Long |
Returns the longitude property of the geography instance. |
M M M |
Returns the M (measure) value of the geography instance. |
Null Null Null |
Returns a read-only property providing a null instance of the SqlGeography type. |
STSrid STSrid STSrid |
Gets or sets id is an integer representing the Spatial Reference Identifier (SRID) of the instance. |
Z Z Z |
Gets the Z (elevation) value of the instance. The semantics of the elevation value are user-defined. |
Methods
AsBinaryZM() AsBinaryZM() AsBinaryZM() |
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. |
AsGml() AsGml() AsGml() |
Returns the Geography Markup Language (GML) representation of a SqlGeography instance. |
AsTextZM() AsTextZM() AsTextZM() |
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. |
BufferWithCurves(Double) BufferWithCurves(Double) BufferWithCurves(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 |
BufferWithTolerance(Double, Double, Boolean) BufferWithTolerance(Double, Double, Boolean) BufferWithTolerance(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. |
CurveToLineWithTolerance(Double, Boolean) CurveToLineWithTolerance(Double, Boolean) CurveToLineWithTolerance(Double, Boolean) |
Returns a polygonal approximation of a SqlGeography instance that contains circular arc segments. |
Deserialize(SqlBytes) Deserialize(SqlBytes) Deserialize(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. |
EnvelopeAngle() EnvelopeAngle() EnvelopeAngle() |
Returns the maximum angle between the point returned by EnvelopeCenter() and a point in the SqlGeography instance in degrees. |
EnvelopeCenter() EnvelopeCenter() EnvelopeCenter() |
Returns a point that can be used as the center of a bounding circle for the geography instance. |
Filter(SqlGeography) Filter(SqlGeography) Filter(SqlGeography) |
Offers a fast, index-only intersection method to determine if a geography instance intersects another SqlGeography instance, assuming an index is available. |
GeomFromGml(SqlXml, Int32) GeomFromGml(SqlXml, Int32) GeomFromGml(SqlXml, Int32) |
Constructs a SqlGeography instance given a representation in the SQL Server subset of the Geography Markup Language (GML). |
InstanceOf(String) InstanceOf(String) InstanceOf(String) |
Tests if the SqlGeography instance is the same as the specified type. |
IsValidDetailed() IsValidDetailed() IsValidDetailed() |
Returns a message to help identify validity issues with a spatial object. |
MakeValid() MakeValid() MakeValid() |
Converts a geography instance that is not valid into a valid geography instance with a valid Open Geospatial Consortium (OGC) type. |
MinDbCompatibilityLevel() MinDbCompatibilityLevel() MinDbCompatibilityLevel() |
Returns the minimum database compatibility that accepts the SqlGeography type. |
NumRings() NumRings() NumRings() |
Returns the total number of rings in a Polygon instance. |
Parse(SqlString) Parse(SqlString) Parse(SqlString) |
Returns a SqlGeography instance from an Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation. |
Point(Double, Double, Int32) Point(Double, Double, Int32) Point(Double, Double, Int32) |
Constructs a SqlGeography instance representing a Point instance from its x and y values and a spatial reference ID (SRID). |
Populate(IGeographySink) Populate(IGeographySink) Populate(IGeographySink) |
Applies a geography type call sequence to IGeographySink object. The call sequence is a set of figures, lines, and points for geography types. |
Populate(IGeographySink110) Populate(IGeographySink110) Populate(IGeographySink110) |
Applies a geography type call sequence to IGeographySink object. |
Read(BinaryReader) Read(BinaryReader) Read(BinaryReader) |
Reads a binary representation of a geography type into a SqlGeometry object. |
Reduce(Double) Reduce(Double) Reduce(Double) |
Returns an approximation of the given geography instance produced by running the Douglas-Peucker algorithm on the instance with the given tolerance. |
ReorientObject() ReorientObject() ReorientObject() |
Returns a geography instance with interchanged interior regions and exterior regions. |
RingN(Int32) RingN(Int32) RingN(Int32) |
Returns the specified ring of the SqlGeography instance: 1 ≤ n ≤ NumRings(). |
Serialize() Serialize() Serialize() |
Used for sending spatial data across the network. |
ShortestLineTo(SqlGeography) ShortestLineTo(SqlGeography) ShortestLineTo(SqlGeography) |
Returns the shortest distance between the two SqlGeographyinstances. |
STArea() STArea() STArea() |
Returns the total surface area of a SqlGeography instance. |
STAsBinary() STAsBinary() STAsBinary() |
Returns the Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation of a SqlGeography instance. |
STAsText() STAsText() STAsText() |
Returns the Open Geospatial Consortium (OGC) Well-Known Text (WKT) representation of a SqlGeography instance. |
STBuffer(Double) STBuffer(Double) STBuffer(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. |
STContains(SqlGeography) STContains(SqlGeography) STContains(SqlGeography) |
Specifies whether the calling SqlGeography instance spatially contains the SqlGeography instance passed to the method. |
STConvexHull() STConvexHull() STConvexHull() |
Returns an object that represents the convex hull of a SqlGeography instance. |
STCurveN(Int32) STCurveN(Int32) STCurveN(Int32) |
Returns the curve specified from a SqlGeography instance that is a LineString, CircularString, or CompoundCurve. |
STCurveToLine() STCurveToLine() STCurveToLine() |
Returns a polygonal approximation of a SqlGeography instance that contains circular arc segments. |
STDifference(SqlGeography) STDifference(SqlGeography) STDifference(SqlGeography) |
Returns an object representing the points from one SqlGeography instance that do not lie within another SqlGeography instance. |
STDimension() STDimension() STDimension() |
Returns the maximum dimension of a SqlGeography instance |
STDisjoint(SqlGeography) STDisjoint(SqlGeography) STDisjoint(SqlGeography) |
Determines whether the calling SqlGeography instance is spatially disjoint from the specified SqlGeography instance. |
STDistance(SqlGeography) STDistance(SqlGeography) STDistance(SqlGeography) |
Returns the shortest distance between a point in a SqlGeography instance and a point in another SqlGeography instance. |
STEndPoint() STEndPoint() STEndPoint() |
Returns the end point of a SqlGeography instance. |
STEquals(SqlGeography) STEquals(SqlGeography) STEquals(SqlGeography) |
Determines whether the specified SqlGeography instance has the same point set as the calling SqlGeography instance. |
STGeomCollFromText(SqlChars, Int32) STGeomCollFromText(SqlChars, Int32) STGeomCollFromText(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. |
STGeomCollFromWKB(SqlBytes, Int32) STGeomCollFromWKB(SqlBytes, Int32) STGeomCollFromWKB(SqlBytes, Int32) |
Returns a GeometryCollection instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation. |
STGeometryN(Int32) STGeometryN(Int32) STGeometryN(Int32) |
Returns a specified geography element in a GeometryCollection or one of its subtypes. |
STGeometryType() STGeometryType() STGeometryType() |
Returns the Open Geospatial Consortium (OGC) type name represented by a geography instance. |
STGeomFromText(SqlChars, Int32) STGeomFromText(SqlChars, Int32) STGeomFromText(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. |
STGeomFromWKB(SqlBytes, Int32) STGeomFromWKB(SqlBytes, Int32) STGeomFromWKB(SqlBytes, Int32) |
Returns a SqlGeography instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation. |
STIntersection(SqlGeography) STIntersection(SqlGeography) STIntersection(SqlGeography) |
Returns an object representing the points where a SqlGeography instance intersects another SqlGeography instance. |
STIntersects(SqlGeography) STIntersects(SqlGeography) STIntersects(SqlGeography) |
Determines whether the current SqlGeography instance intersects with the specified SqlGeography. |
STIsClosed() STIsClosed() STIsClosed() |
Determines whether the calling SqlGeography instance is closed. |
STIsEmpty() STIsEmpty() STIsEmpty() |
Determines whether the SqlGeography instance is empty. |
STIsValid() STIsValid() STIsValid() |
Specifies whether a geography instance is well-formed and recognized as a valid geography object based on its Open Geospatial Consortium (OGC) type. |
STLength() STLength() STLength() |
Returns the total length of the elements in a SqlGeography instance or the SqlGeography instances within a GeometryCollection. |
STLineFromText(SqlChars, Int32) STLineFromText(SqlChars, Int32) STLineFromText(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. |
STLineFromWKB(SqlBytes, Int32) STLineFromWKB(SqlBytes, Int32) STLineFromWKB(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. |
STMLineFromText(SqlChars, Int32) STMLineFromText(SqlChars, Int32) STMLineFromText(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. |
STMLineFromWKB(SqlBytes, Int32) STMLineFromWKB(SqlBytes, Int32) STMLineFromWKB(SqlBytes, Int32) |
Returns a SqlGeography MultiLineString instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation. |
STMPointFromText(SqlChars, Int32) STMPointFromText(SqlChars, Int32) STMPointFromText(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. |
STMPointFromWKB(SqlBytes, Int32) STMPointFromWKB(SqlBytes, Int32) STMPointFromWKB(SqlBytes, Int32) |
Returns a SqlGeography MultiPoint instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation. |
STMPolyFromText(SqlChars, Int32) STMPolyFromText(SqlChars, Int32) STMPolyFromText(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. |
STMPolyFromWKB(SqlBytes, Int32) STMPolyFromWKB(SqlBytes, Int32) STMPolyFromWKB(SqlBytes, Int32) |
Returns a SqlGeography MultiPolygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation. |
STNumCurves() STNumCurves() STNumCurves() |
Returns the number of curves in a one-dimensional SqlGeography instance. |
STNumGeometries() STNumGeometries() STNumGeometries() |
Returns the number of geometries that make up a SqlGeography instance. |
STNumPoints() STNumPoints() STNumPoints() |
Returns the total number of points in each of the figures in a SqlGeography instance |
STOverlaps(SqlGeography) STOverlaps(SqlGeography) STOverlaps(SqlGeography) |
Returns 1 if a SqlGeography instance spatially overlaps another SqlGeography instance, or 0 if it does not. |
STPointFromText(SqlChars, Int32) STPointFromText(SqlChars, Int32) STPointFromText(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. |
STPointFromWKB(SqlBytes, Int32) STPointFromWKB(SqlBytes, Int32) STPointFromWKB(SqlBytes, Int32) |
Returns a SqlGeography Point instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation. |
STPointN(Int32) STPointN(Int32) STPointN(Int32) |
Returns the specified point in a SqlGeography instance. |
STPolyFromText(SqlChars, Int32) STPolyFromText(SqlChars, Int32) STPolyFromText(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. |
STPolyFromWKB(SqlBytes, Int32) STPolyFromWKB(SqlBytes, Int32) STPolyFromWKB(SqlBytes, Int32) |
Returns a SqlGeography Polygon instance from an Open Geospatial Consortium (OGC) Well-Known Binary (WKB) representation. |
STStartPoint() STStartPoint() STStartPoint() |
Returns the start point of a SqlGeography instance. |
STSymDifference(SqlGeography) STSymDifference(SqlGeography) STSymDifference(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. |
STUnion(SqlGeography) STUnion(SqlGeography) STUnion(SqlGeography) |
Returns an object representing the union of a SqlGeography instance with another SqlGeography instance. |
STWithin(SqlGeography) STWithin(SqlGeography) STWithin(SqlGeography) |
Returns 1 if a SqlGeography instance is spatially within another SqlGeography instance; otherwise, returns 0. |
ToString() ToString() ToString() |
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. |
Write(BinaryWriter) Write(BinaryWriter) Write(BinaryWriter) |
Writes a SqlGeography object to a binary stream. |