geometry.BufferWithCurves
spatial method BufferWithCurves (instance.BufferWithCurves(...))
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
.BufferWithCurves ( distance )
Work example
Use geometry.BufferWithCurves to create a buffer while retaining supported curve segments.
Set tolerance for coordinate scale and inspect the result. Keep the geometry type and SRID in the review.
Check your work The buffer distance is 1 planar coordinate unit. The curved output is checked for OGC validity.
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'CIRCULARSTRING(0 0, 2 2, 4 0)', 0);
SELECT @shape.BufferWithCurves(1).STAsText() AS curved_buffer, @shape.BufferWithCurves(1).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.