# DbSpatialServices Class

**.NET Framework 4.5**

Represents a provider-independent service API for geospatial (Geometry/Geography) type support.

**Namespace:**System.Data.Spatial

**Assembly:**System.Data.Entity (in System.Data.Entity.dll)

The DbSpatialServices type exposes the following members.

Name | Description | |
---|---|---|

AsBinary(DbGeography) | Gets the well-known binary representation of the given DbGeography value. | |

AsBinary(DbGeometry) | Gets the well-known binary representation of the given DbGeometry value. | |

AsGml(DbGeography) | Generates the Geography Markup Language (GML) representation of this DbGeography value. | |

AsGml(DbGeometry) | Generates the Geography Markup Language (GML) representation of this DbGeometry value. | |

AsText(DbGeography) | Gets the well-known text representation of the given DbGeography value. This value should include only the Longitude and Latitude of points. | |

AsText(DbGeometry) | Gets the well-known text representation of the given DbGeometry value, including only X and Y coordinates for points. | |

AsTextIncludingElevationAndMeasure(DbGeography) | Returns a text representation of DbSpatialServices with elevation and measure. | |

AsTextIncludingElevationAndMeasure(DbGeometry) | Returns a text representation of DbSpatialServices with elevation and measure. | |

Buffer(DbGeography, Double) | Creates a geography value representing all points less than or equal to distance from the given DbGeography value. | |

Buffer(DbGeometry, Double) | Creates a geometry value representing all points less than or equal to distance from the given DbGeometry value. | |

Contains | Determines whether one DbGeometry value spatially contains the other. | |

CreateGeography | This method is intended for use by derived implementations of GeographyFromProviderValue after suitable validation of the specified provider value to ensure it is suitable for use with the derived implementation. | |

CreateGeometry | This method is intended for use by derived implementations of GeometryFromProviderValue after suitable validation of the specified provider value to ensure it is suitable for use with the derived implementation. | |

CreateProviderValue(DbGeographyWellKnownValue) | Creates a provider-specific value compatible with this spatial services implementation based on the specified well-known DbGeography representation. | |

CreateProviderValue(DbGeometryWellKnownValue) | Creates a provider-specific value compatible with this spatial services implementation based on the specified well-known DbGeometry representation. | |

CreateWellKnownValue(DbGeography) | Creates an instance of DbGeographyWellKnownValue that represents the specified DbGeography value using one or both of the standard well-known spatial formats. | |

CreateWellKnownValue(DbGeometry) | Creates an instance of DbGeometryWellKnownValue that represents the specified DbGeometry value using one or both of the standard well-known spatial formats. | |

Crosses | Determines whether the two given DbGeometry values spatially cross. | |

Difference(DbGeography, DbGeography) | Computes the difference of two DbGeography values. | |

Difference(DbGeometry, DbGeometry) | Computes the difference between two DbGeometry values. | |

Disjoint(DbGeography, DbGeography) | Determines whether the two given DbGeography values are spatially disjoint. | |

Disjoint(DbGeometry, DbGeometry) | Determines whether the two given DbGeometry values are spatially disjoint. | |

Distance(DbGeography, DbGeography) | Computes the distance between the closest points in two DbGeography values. | |

Distance(DbGeometry, DbGeometry) | Computes the distance between the closest points in two DbGeometry values. | |

ElementAt(DbGeography, Int32) | Returns an element of the given DbGeography value, if it represents a geography collection. | |

ElementAt(DbGeometry, Int32) | Returns an element of the given DbGeometry value, if it represents a geometry collection. | |

Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |

Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |

GeographyCollectionFromBinary | Creates a new DbGeography collection value based on the specified well-known binary value and coordinate system identifier (SRID). | |

GeographyCollectionFromText | Creates a new DbGeography collection value based on the specified well-known text value and coordinate system identifier (SRID). | |

GeographyFromBinary(array<Byte>) | Creates a new DbGeography value based on the specified well-known binary value. | |

GeographyFromBinary(array<Byte>, Int32) | Creates a new DbGeography value based on the specified well-known binary value and coordinate system identifier (SRID). | |

GeographyFromGml(String) | Creates a new DbGeography value based on the specified Geography Markup Language (GML) value. | |

GeographyFromGml(String, Int32) | Creates a new DbGeography value based on the specified Geography Markup Language (GML) value and coordinate system identifier (SRID). | |

GeographyFromProviderValue | Creates a new DbGeography value based on a provider-specific value that is compatible with this spatial services implementation. | |

GeographyFromText(String) | Creates a new DbGeography value based on the specified well-known text value. | |

GeographyFromText(String, Int32) | Creates a new DbGeography value based on the specified well-known text value and coordinate system identifier (SRID). | |

GeographyLineFromBinary | Creates a new DbGeography line value based on the specified well-known binary value and coordinate system identifier (SRID). | |

GeographyLineFromText | Creates a new DbGeography line value based on the specified well-known text value and coordinate system identifier (SRID). | |

GeographyMultiLineFromBinary | Creates a new DbGeography multiline value based on the specified well-known binary value and coordinate system identifier. | |

GeographyMultiLineFromText | Creates a new DbGeography multiline value based on the specified well-known text value and coordinate system identifier. | |

GeographyMultiPointFromBinary | Creates a new DbGeography multipoint value based on the specified well-known binary value and coordinate system identifier. | |

GeographyMultiPointFromText | Creates a new DbGeography multipoint value based on the specified well-known text value and coordinate system identifier. | |

GeographyMultiPolygonFromBinary | Creates a new DbGeography multi polygon value based on the specified well-known binary value and coordinate system identifier. | |

GeographyMultiPolygonFromText | Creates a new DbGeography multi polygon value based on the specified well-known text value and coordinate system identifier. | |

GeographyPointFromBinary | Creates a new DbGeography point value based on the specified well-known binary value and coordinate system identifier (SRID). | |

GeographyPointFromText | Creates a new DbGeography point value based on the specified well-known text value and coordinate system identifier (SRID). | |

GeographyPolygonFromBinary | Creates a new DbGeography polygon value based on the specified well-known binary value and coordinate system identifier (SRID). | |

GeographyPolygonFromText | Creates a new DbGeography polygon value based on the specified well-known text value and coordinate system identifier (SRID). | |

GeometryCollectionFromBinary | Creates a new DbGeometry collection value based on the specified well-known binary value and coordinate system identifier (SRID). | |

GeometryCollectionFromText | Creates a new DbGeometry collection value based on the specified well-known text value and coordinate system identifier (SRID). | |

GeometryFromBinary(array<Byte>) | Creates a new DbGeometry value based on the specified well-known binary value. | |

GeometryFromBinary(array<Byte>, Int32) | Creates a new DbGeometry value based on the specified well-known binary value and coordinate system identifier (SRID). | |

GeometryFromGml(String) | Creates a new DbGeometry value based on the specified Geography Markup Language (GML) value. | |

GeometryFromGml(String, Int32) | Creates a new DbGeometry value based on the specified Geography Markup Language (GML) value and coordinate system identifier (SRID). | |

GeometryFromProviderValue | Creates a new DbGeometry value based on a provider-specific value that is compatible with this spatial services implementation. | |

GeometryFromText(String) | Creates a new DbGeometry value based on the specified well-known text value. | |

GeometryFromText(String, Int32) | Creates a new DbGeometry value based on the specified well-known text value and coordinate system identifier (SRID). | |

GeometryLineFromBinary | Creates a new DbGeometry line value based on the specified well-known binary value and coordinate system identifier (SRID). | |

GeometryLineFromText | Creates a new DbGeometry line value based on the specified well-known text value and coordinate system identifier (SRID). | |

GeometryMultiLineFromBinary | Creates a new DbGeometry multiline value based on the specified well-known binary value and coordinate system identifier. | |

GeometryMultiLineFromText | Creates a new DbGeometry multiline value based on the specified well-known text value and coordinate system identifier. | |

GeometryMultiPointFromBinary | Creates a new DbGeometry multipoint value based on the specified well-known binary value and coordinate system identifier. | |

GeometryMultiPointFromText | Creates a new DbGeometry multipoint value based on the specified well-known text value and coordinate system identifier. | |

GeometryMultiPolygonFromBinary | Creates a new DbGeometry multi polygon value based on the specified well-known binary value and coordinate system identifier. | |

GeometryMultiPolygonFromText | Creates a new DbGeometry multi polygon value based on the specified well-known text value and coordinate system identifier. | |

GeometryPointFromBinary | Creates a new DbGeometry point value based on the specified well-known binary value and coordinate system identifier (SRID). | |

GeometryPointFromText | Creates a new DbGeometry point value based on the specified well-known text value and coordinate system identifier (SRID). | |

GeometryPolygonFromBinary | Creates a new DbGeometry polygon value based on the specified well-known binary value and coordinate system identifier (SRID). | |

GeometryPolygonFromText | Creates a new DbGeometry polygon value based on the specified well-known text value and coordinate system identifier (SRID). | |

GetArea(DbGeography) | Returns a nullable double value that indicates the area of the given DbGeography value, which may be null if the value does not represent a surface. | |

GetArea(DbGeometry) | Returns a nullable double value that indicates the area of the given DbGeometry value, which may be null if the value does not represent a surface. | |

GetBoundary | Returns a nullable double value that indicates the boundary of the given DbGeography value. | |

GetCentroid | Returns a DbGeometry value that represents the centroid of the given DbGeometry value, which may be null if the value does not represent a surface. | |

GetConvexHull | Returns a nullable double value that indicates the convex hull of the given DbGeography value. | |

GetCoordinateSystemId(DbGeography) | Returns the coordinate system identifier of the given DbGeography value. | |

GetCoordinateSystemId(DbGeometry) | Returns the coordinate system identifier of the given DbGeometry value. | |

GetDimension(DbGeography) | Gets the dimension of the given DbGeography value or, if the value is a collections, the largest element dimension. | |

GetDimension(DbGeometry) | Gets the dimension of the given DbGeometry value or, if the value is a collections, the largest element dimension. | |

GetElementCount(DbGeography) | Returns the number of elements in the given DbGeography value, if it represents a geography collection. | |

GetElementCount(DbGeometry) | Returns the number of elements in the given DbGeometry value, if it represents a geometry collection. | |

GetElevation(DbGeography) | Returns the elevation (Z coordinate) of the given DbGeography value, if it represents a point. | |

GetElevation(DbGeometry) | Returns the elevation (Z) of the given DbGeometry value, if it represents a point. | |

GetEndPoint(DbGeography) | Returns a DbGeography value that represents the end point of the given DbGeography value, which may be null if the value does not represent a curve. | |

GetEndPoint(DbGeometry) | Returns a DbGeometry value that represents the end point of the given DbGeometry value, which may be null if the value does not represent a curve. | |

GetEnvelope | Gets the envelope (minimum bounding box) of the given DbGeometry value, as a geometry value. | |

GetExteriorRing | Returns a DbGeometry value that represents the exterior ring of the given DbGeometry value, which may be null if the value does not represent a polygon. | |

GetHashCode | Serves as the default hash function. (Inherited from Object.) | |

GetInteriorRingCount | Returns the number of interior rings in the given DbGeometry value, if it represents a polygon. | |

GetIsClosed(DbGeography) | Returns a nullable Boolean value that whether the given DbGeography value is closed, which may be null if the value does not represent a curve. | |

GetIsClosed(DbGeometry) | Returns a nullable Boolean value that whether the given DbGeometry value is closed, which may be null if the value does not represent a curve. | |

GetIsEmpty(DbGeography) | Returns a nullable Boolean value that whether the given DbGeography value is empty. | |

GetIsEmpty(DbGeometry) | Returns a nullable Boolean value that whether the given DbGeometry value is empty. | |

GetIsRing | Returns a nullable Boolean value that whether the given DbGeometry value is a ring, which may be null if the value does not represent a curve. | |

GetIsSimple | Returns a nullable Boolean value that whether the given DbGeometry value is simple. | |

GetIsValid | Returns a nullable Boolean value that whether the given DbGeometry value is valid. | |

GetLatitude | Returns the Latitude coordinate of the given DbGeography value, if it represents a point. | |

GetLength(DbGeography) | Returns a nullable double value that indicates the length of the given DbGeography value, which may be null if the value does not represent a curve. | |

GetLength(DbGeometry) | Returns a nullable double value that indicates the length of the given DbGeometry value, which may be null if the value does not represent a curve. | |

GetLongitude | Returns the Longitude coordinate of the given DbGeography value, if it represents a point. | |

GetMeasure(DbGeography) | Returns the M (Measure) coordinate of the given DbGeography value, if it represents a point. | |

GetMeasure(DbGeometry) | Returns the M (Measure) coordinate of the given DbGeometry value, if it represents a point. | |

GetPointCount(DbGeography) | Returns the number of points in the given DbGeography value, if it represents a linestring or linear ring. | |

GetPointCount(DbGeometry) | Returns the number of points in the given DbGeometry value, if it represents a linestring or linear ring. | |

GetPointOnSurface | Returns a DbGeometry value that represents a point on the surface of the given DbGeometry value, which may be null if the value does not represent a surface. | |

GetSpatialTypeName(DbGeography) | Returns a value that indicates the spatial type name of the given DbGeography value. | |

GetSpatialTypeName(DbGeometry) | Returns a value that indicates the spatial type name of the given DbGeometry value. | |

GetStartPoint(DbGeography) | Returns a DbGeography value that represents the start point of the given DbGeography value, which may be null if the value does not represent a curve. | |

GetStartPoint(DbGeometry) | Returns a DbGeometry value that represents the start point of the given DbGeometry value, which may be null if the value does not represent a curve. | |

GetType | Gets the Type of the current instance. (Inherited from Object.) | |

GetXCoordinate | Returns the X coordinate of the given DbGeometry value, if it represents a point. | |

GetYCoordinate | Returns the Y coordinate of the given DbGeometry value, if it represents a point. | |

InteriorRingAt | Returns an interior ring from the given DbGeometry value, if it represents a polygon. | |

Intersection(DbGeography, DbGeography) | Computes the intersection of two DbGeography values. | |

Intersection(DbGeometry, DbGeometry) | Computes the intersection of two DbGeometry values. | |

Intersects(DbGeography, DbGeography) | Determines whether the two given DbGeography values spatially intersect. | |

Intersects(DbGeometry, DbGeometry) | Determines whether the two given DbGeometry values spatially intersect. | |

MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |

Overlaps | Determines whether the two given DbGeometry values spatially overlap. | |

PointAt(DbGeography, Int32) | Returns a point element of the given DbGeography value, if it represents a linestring or linear ring. | |

PointAt(DbGeometry, Int32) | Returns a point element of the given DbGeometry value, if it represents a linestring or linear ring. | |

Relate | Determines whether the two given DbGeometry values are spatially related according to the given Dimensionally Extended Nine-Intersection Model (DE-9IM) intersection pattern. | |

SpatialEquals(DbGeography, DbGeography) | Determines whether the two given DbGeography values are spatially equal. | |

SpatialEquals(DbGeometry, DbGeometry) | Determines whether the two given DbGeometry values are spatially equal. | |

SymmetricDifference(DbGeography, DbGeography) | Computes the symmetric difference of two DbGeography values. | |

SymmetricDifference(DbGeometry, DbGeometry) | Computes the symmetric difference between two DbGeometry values. | |

ToString | Returns a string that represents the current object. (Inherited from Object.) | |

Touches | Determines whether the two given DbGeometry values spatially touch. | |

Union(DbGeography, DbGeography) | Computes the union of two DbGeography values. | |

Union(DbGeometry, DbGeometry) | Computes the union of two DbGeometry values. | |

Within | Determines whether one DbGeometry value is spatially within the other. |

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show: