# SpatialEdmFunctions Class

**.NET Framework 4.5**

Provides an API to construct DbExpressions that invoke spatial realted canonical EDM functions, and, where appropriate, allows that API to be accessed as extension methods on the expression type itself.

**Namespace:**System.Data.Common.CommandTrees.ExpressionBuilder.Spatial

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

The SpatialEdmFunctions type exposes the following members.

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

Area | Creates a DbFunctionExpression that invokes the canonical 'Area' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double. | |

AsBinary | Creates a DbFunctionExpression that invokes the canonical 'AsBinary' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Binary. | |

AsGml | Creates a DbFunctionExpression that invokes the canonical 'AsGml' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.String. | |

AsText | Creates a DbFunctionExpression that invokes the canonical 'AsText' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.String. | |

Centroid | Creates a DbFunctionExpression that invokes the canonical 'Centroid' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. | |

CoordinateSystemId | Creates a DbFunctionExpression that invokes the canonical 'CoordinateSystemId' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32. | |

Distance | Creates a DbFunctionExpression that invokes the canonical 'Distance' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Double. | |

Elevation | Creates a DbFunctionExpression that invokes the canonical 'Elevation' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double. | |

EndPoint | Creates a DbFunctionExpression that invokes the canonical 'EndPoint' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type is the same as that of spatialValue. | |

ExteriorRing | Creates a DbFunctionExpression that invokes the canonical 'ExteriorRing' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. | |

GeographyCollectionFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeographyCollectionFromBinary' function with the specified arguments. geographyCollectionWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyCollectionFromText | Creates a DbFunctionExpression that invokes the canonical 'GeographyCollectionFromText' function with the specified arguments. geographyCollectionWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyFromBinary(DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeographyFromBinary' function with the specified argument, which must have a binary result type. The result type of the expression is Edm.Geography. | |

GeographyFromBinary(DbExpression, DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeographyFromBinary' function with the specified arguments. wellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyFromGml(DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeographyFromGml' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geography. | |

GeographyFromGml(DbExpression, DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeographyFromGml' function with the specified arguments. geographyMarkup must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyFromText(DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeographyFromText' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geography. Its value has the default coordinate system id (SRID) of the underlying provider. | |

GeographyFromText(DbExpression, DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeographyFromText' function with the specified arguments. wellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyLineFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeographyLineFromBinary' function with the specified arguments. lineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyLineFromText | Creates a DbFunctionExpression that invokes the canonical 'GeographyLineFromText' function with the specified arguments. lineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyMultiLineFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeographyMultiLineFromBinary' function with the specified arguments. multiLineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyMultiLineFromText | Creates a DbFunctionExpression that invokes the canonical 'GeographyMultiLineFromText' function with the specified arguments. multiLineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyMultiPointFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeographyMultiPointFromBinary' function with the specified arguments. multiPointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyMultiPointFromText | Creates a DbFunctionExpression that invokes the canonical 'GeographyMultiPointFromText' function with the specified arguments. multiPointWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyMultiPolygonFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeographyMultiPolygonFromBinary' function with the specified arguments. multiPolygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyMultiPolygonFromText | Creates a DbFunctionExpression that invokes the canonical 'GeographyMultiPolygonFromText' function with the specified arguments. multiPolygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyPointFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeographyPointFromBinary' function with the specified arguments. pointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyPointFromText | Creates a DbFunctionExpression that invokes the canonical 'GeographyPointFromText' function with the specified arguments. | |

GeographyPolygonFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeographyPolygonFromBinary' function with the specified arguments. polygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeographyPolygonFromText | Creates a DbFunctionExpression that invokes the canonical 'GeographyPolygonFromText' function with the specified arguments. polygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geography. | |

GeometryCollectionFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeometryCollectionFromBinary' function with the specified arguments. geometryCollectionWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryCollectionFromText | Creates a DbFunctionExpression that invokes the canonical 'GeometryCollectionFromText' function with the specified arguments. geometryCollectionWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryFromBinary(DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeometryFromBinary' function with the specified argument, which must have a binary result type. The result type of the expression is Edm.Geometry. | |

GeometryFromBinary(DbExpression, DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeometryFromBinary' function with the specified arguments. wellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryFromGml(DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeometryFromGml' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geometry. | |

GeometryFromGml(DbExpression, DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeometryFromGml' function with the specified arguments. geometryMarkup must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryFromText(DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeometryFromText' function with the specified argument, which must have a string result type. The result type of the expression is Edm.Geometry. Its value has the default coordinate system id (SRID) of the underlying provider. | |

GeometryFromText(DbExpression, DbExpression) | Creates a DbFunctionExpression that invokes the canonical 'GeometryFromText' function with the specified arguments. wellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryLineFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeometryLineFromBinary' function with the specified arguments. lineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryLineFromText | Creates a DbFunctionExpression that invokes the canonical 'GeometryLineFromText' function with the specified arguments. lineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryMultiLineFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeometryMultiLineFromBinary' function with the specified arguments. multiLineWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryMultiLineFromText | Creates a DbFunctionExpression that invokes the canonical 'GeometryMultiLineFromText' function with the specified arguments. multiLineWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryMultiPointFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeometryMultiPointFromBinary' function with the specified arguments. multiPointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryMultiPointFromText | Creates a DbFunctionExpression that invokes the canonical 'GeometryMultiPointFromText' function with the specified arguments. multiPointWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryMultiPolygonFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeometryMultiPolygonFromBinary' function with the specified arguments. multiPolygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryMultiPolygonFromText | Creates a DbFunctionExpression that invokes the canonical 'GeometryMultiPolygonFromText' function with the specified arguments. multiPolygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryPointFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeometryPointFromBinary' function with the specified arguments. pointWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryPointFromText | Creates a DbFunctionExpression that invokes the canonical 'GeometryPointFromText' function with the specified arguments. pointWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryPolygonFromBinary | Creates a DbFunctionExpression that invokes the canonical 'GeometryPolygonFromBinary' function with the specified arguments. polygonWellKnownBinaryValue must have a binary result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

GeometryPolygonFromText | Creates a DbFunctionExpression that invokes the canonical 'GeometryPolygonFromText' function with the specified arguments. polygonWellKnownText must have a string result type, while coordinateSystemId must have an integer numeric result type. The result type of the expression is Edm.Geometry. | |

InteriorRingAt | Creates a DbFunctionExpression that invokes the canonical 'InteriorRingAt' function with the specified arguments. The first argument must have an Edm.Geometry result type. The second argument must have an integer numeric result types. The result type of the expression is Edm.Geometry. | |

InteriorRingCount | Creates a DbFunctionExpression that invokes the canonical 'InteriorRingCount' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Int32. | |

IsClosedSpatial | Creates a DbFunctionExpression that invokes the canonical 'IsClosedSpatial' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type is Edm.Boolean. | |

IsEmptySpatial | Creates a DbFunctionExpression that invokes the canonical 'IsEmptySpatial' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Boolean. | |

IsRing | Creates a DbFunctionExpression that invokes the canonical 'IsRing' function with the specified argument, which must have an Edm.Geometry result type. The result type is Edm.Boolean. | |

IsSimpleGeometry | Creates a DbFunctionExpression that invokes the canonical 'IsSimpleGeometry' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. | |

IsValidGeometry | Creates a DbFunctionExpression that invokes the canonical 'IsValidGeometry' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. | |

Latitude | Creates a DbFunctionExpression that invokes the canonical 'Latitude' function with the specified argument, which must have an Edm.Geography result type. The result type of the expression is Edm.Double. | |

Longitude | Creates a DbFunctionExpression that invokes the canonical 'Longitude' function with the specified argument, which must have an Edm.Geography result type. The result type of the expression is Edm.Double. | |

Measure | Creates a DbFunctionExpression that invokes the canonical 'Measure' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double. | |

PointAt | Creates a DbFunctionExpression that invokes the canonical 'PointAt' function with the specified arguments. The first argument must have an Edm.Geography or Edm.Geometry result type. The second argument must have an integer numeric result type. The result type of the expression is the same as that of spatialValue. | |

PointCount | Creates a DbFunctionExpression that invokes the canonical 'PointCount' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32. | |

PointOnSurface | Creates a DbFunctionExpression that invokes the canonical 'PointOnSurface' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. | |

SpatialBoundary | Creates a DbFunctionExpression that invokes the canonical 'SpatialBoundary' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. | |

SpatialBuffer | Creates a DbFunctionExpression that invokes the canonical 'SpatialBuffer' function with the specified arguments, which must have a Edm.Geography or Edm.Geometry and Edm.Double result types. The result type of the expression is Edm.Geometry. | |

SpatialContains | Creates a DbFunctionExpression that invokes the canonical 'SpatialContains' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. | |

SpatialConvexHull | Creates a DbFunctionExpression that invokes the canonical 'SpatialConvexHull' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. | |

SpatialCrosses | Creates a DbFunctionExpression that invokes the canonical 'SpatialCrosses' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. | |

SpatialDifference | Creates a DbFunctionExpression that invokes the canonical 'SpatialDifference' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2. | |

SpatialDimension | Creates a DbFunctionExpression that invokes the canonical 'SpatialDimension' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32. | |

SpatialDisjoint | Creates a DbFunctionExpression that invokes the canonical 'SpatialDisjoint' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Boolean. | |

SpatialElementAt | Creates a DbFunctionExpression that invokes the canonical 'SpatialElementAt' function with the specified arguments. The first argument must have an Edm.Geography or Edm.Geometry result type. The second argument must have an integer numeric result type. The result type of the expression is the same as that of spatialValue. | |

SpatialElementCount | Creates a DbFunctionExpression that invokes the canonical 'SpatialElementCount' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Int32. | |

SpatialEnvelope | Creates a DbFunctionExpression that invokes the canonical 'SpatialEnvelope' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Geometry. | |

SpatialEquals | Creates a DbFunctionExpression that invokes the canonical 'SpatialEquals' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Boolean. | |

SpatialIntersection | Creates a DbFunctionExpression that invokes the canonical 'SpatialIntersection' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2. | |

SpatialIntersects | Creates a DbFunctionExpression that invokes the canonical 'SpatialIntersects' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is Edm.Boolean. | |

SpatialLength | Creates a DbFunctionExpression that invokes the canonical 'SpatialLength' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.Double. | |

SpatialOverlaps | Creates a DbFunctionExpression that invokes the canonical 'SpatialOverlaps' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. | |

SpatialRelate | Creates a DbFunctionExpression that invokes the canonical 'SpatialRelate' function with the specified arguments, which must have Edm.Geometry and string result types. The result type of the expression is Edm.Boolean. | |

SpatialSymmetricDifference | Creates a DbFunctionExpression that invokes the canonical 'SpatialSymmetricDifference' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2. | |

SpatialTouches | Creates a DbFunctionExpression that invokes the canonical 'SpatialTouches' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. | |

SpatialTypeName | Creates a DbFunctionExpression that invokes the canonical 'SpatialTypeName' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type of the expression is Edm.String. | |

SpatialUnion | Creates a DbFunctionExpression that invokes the canonical 'SpatialUnion' function with the specified arguments, which must each have an Edm.Geography or Edm.Geometry result type. The result type of spatialValue1 must match the result type of spatialValue2. The result type of the expression is the same as the type of spatialValue1 and spatialValue2. | |

SpatialWithin | Creates a DbFunctionExpression that invokes the canonical 'SpatialWithin' function with the specified arguments, which must each have an Edm.Geometry result type. The result type of the expression is Edm.Boolean. | |

StartPoint | Creates a DbFunctionExpression that invokes the canonical 'StartPoint' function with the specified argument, which must have an Edm.Geography or Edm.Geometry result type. The result type is the same as that of spatialValue. | |

XCoordinate | Creates a DbFunctionExpression that invokes the canonical 'XCoordinate' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Double. | |

YCoordinate | Creates a DbFunctionExpression that invokes the canonical 'YCoordinate' function with the specified argument, which must have an Edm.Geometry result type. The result type of the expression is Edm.Double. |

Show: