# SqlSpatialFunctions Class

**.NET Framework 4.6 and 4.5**

Represents the SQL spatial functions for the SQL client.

**Namespace:**System.Data.Objects.SqlClient

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

The SqlSpatialFunctions type exposes the following members.

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

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

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

BufferWithTolerance(DbGeography, Nullable<Double>, Nullable<Double>, Nullable<Boolean>) | Returns a geometric object representing the union of all point values whose distance from a geography instance is less than or equal to a specified value, allowing for a specified tolerance. | |

BufferWithTolerance(DbGeometry, Nullable<Double>, Nullable<Double>, Nullable<Boolean>) | Returns a geometric object representing the union of all point values whose distance from a geometry instance is less than or equal to a specified value, allowing for a specified tolerance. | |

EnvelopeAngle | Returns the maximum angle between the point returned by EnvelopeCenter() and a point in the geography instance in degrees. | |

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

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

Filter(DbGeometry, DbGeometry) | Offers a fast, index-only intersection method to determine if a geography instance intersects another SqlGeometry instance, assuming an index is available. | |

InstanceOf(DbGeography, String) | Tests if the SqlGeography instance is the same as the specified type. | |

InstanceOf(DbGeometry, String) | Tests if the SqlGeometry instance is the same as the specified type. | |

MakeValid | Converts an invalid geometry instance into a geometry instance with a valid Open Geospatial Consortium (OGC) type. | |

NumRings | Returns the total number of rings in a Polygon instance. | |

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

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

Reduce(DbGeography, Nullable<Double>) | Returns an approximation of the given geography instance produced by running the Douglas-Peucker algorithm on the instance with the given tolerance. | |

Reduce(DbGeometry, Nullable<Double>) | Returns an approximation of the given geography instance produced by running the Douglas-Peucker algorithm on the instance with the given tolerance. | |

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

Show: