geometry.BufferWithTolerance
spatial method BufferWithTolerance (instance.BufferWithTolerance(...))
What changes
- Input
- spatial instance (and arguments)
- Output or change
- geometry
- Return type
- SQL Server return type: geometry CLR return type: SqlGeometry
Syntax at a glance
.BufferWithTolerance ( distance, tolerance, relative )
Work example
Use geometry.BufferWithTolerance to create a buffer with an explicit curve tolerance.
Set tolerance in spatial units and compare at the intended map scale. Keep the geometry type and SRID in the review.
Check your work The buffer distance is 2 coordinate units and tolerance is absolute at 0.25 units.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
-- Planar geometry. SRID 0 coordinates here are synthetic units, not metres.
DECLARE @shape geometry;
SET @shape = geometry::STGeomFromText(N'POINT(3 4)', 0);
SELECT @shape.BufferWithTolerance(2, 0.25, 0).STAsText() AS buffered_point, @shape.BufferWithTolerance(2, 0.25, 0).STIsValid() AS buffer_is_valid,
@shape.STSrid AS source_srid,
@shape.STIsValid() AS source_is_valid;
Open Microsoft Learn for full syntax, permissions, and details for your version.