geography.STBuffer
spatial method STBuffer (instance.STBuffer(...))
What changes
- Input
- spatial instance (and arguments)
- Output or change
- geography
- Return type
- SQL Server return type: geography CLR return type: SqlGeography
Syntax at a glance
.STBuffer ( distance )
Work example
Use geography.STBuffer to expand or contract a shape by a distance.
For geometry use coordinate units. For geography check SRID units and negative distances. Keep the geography type and SRID in the review.
Check your work The nonempty geography buffer extends 100 metres from the point, using SRID 4326 units.
Practice SQL
Open in SQL FlowOpen the SQL for a walkthrough. Run the example in SQL Server to check its result.
SELECT p.shape.STBuffer(100).STGeometryType() AS buffer_type, p.shape.STBuffer(100).STIsEmpty() AS is_empty FROM (VALUES (geography::Point(47.651, -122.349, 4326))) AS p(shape);
Open Microsoft Learn for full syntax, permissions, and details for your version.