# BufferWithTolerance (geography Data Type)

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.

## Syntax

```
.BufferWithTolerance ( distance, tolerance, relative )
```

## Arguments

distance

Is a float expression specifying the distance from the geography instance around which to calculate the buffer.tolerance

Is a float expression specifying the tolerance of the buffer distance.The tolerance value refers to the maximum variation in the ideal buffer distance for the returned linear approximation.

For example, the ideal buffer distance of a point is a circle, but this must be approximated by a polygon. The smaller the tolerance, the more points the polygon will have, which increases the complexity of the result, but decreases the error.

relative

Is a bit specifying whether the tolerance value is relative or absolute. If 'TRUE' or 1, then tolerance is relative and is calculated as the product of the tolerance parameter and the angular extent * equatorial radius of the ellipsoid. If 'FALSE' or 0, tolerance is absolute and the tolerance value is the absolute maximum variation in the ideal buffer distance for the returned linear approximation.

## Return Types

SQL Server return type: geography

CLR return type: SqlGeography

## Remarks

A negative buffer removes all points within the given distance of the boundary of the geography instance.

The error between the theorectical and computed buffer is max(tolerance, extents * 1.E-7) where tolerance is the value of the tolerance parameter. For more information on extents, see geography Data Type Method Reference.

## Examples

The following example creates a Point instance and uses BufferWithTolerance() to obtain a rough buffer around it.

```
DECLARE @g geography;
SET @g = geography::STGeomFromText('POINT(-122.34900 47.65100)', 4326);
SELECT @g.BufferWithTolerance(1, .5, 0).ToString();
```

## See Also