Export (0) Print
Expand All
Expand Minimize

STBuffer (geometry Data Type)

Returns a geometric object that represents the union of all points whose distance from a geometry instance is less than or equal to a specified value.


.STBuffer (distance)

distance

Is a value of type float (double in the .NET Framework) specifying the distance from the geometry instance around which to calculate the buffer.

SQL Server return type: geometry

CLR return type: SqlGeometry

STBuffer() calculates a buffer in the same manner as BufferWithTolerance, specifying tolerance = distance * .001 and relative = false.

A negative buffer removes all points within the given distance of the boundary of the geometry. The error between the theorectical and computed buffer is max(tolerance, extents * 1.E-7) where tolerance = distance * .001. For more information on the computed error, see geometry Data Type Method Reference.

The following example creates a LineStringgeometry instance. It then uses STBuffer() to return the region within 1 unit of the instance.

DECLARE @g geometry;
SET @g = geometry::STGeomFromText('LINESTRING(0 0, 4 0)', 0);
SELECT @g.STBuffer(1).ToString();
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft