SQL Flow Field Guide

geometry.Reduce

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

spatial method Reduce (instance.Reduce(...))

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

.Reduce ( tolerance )

Work example

Use geometry.Reduce to simplify coordinate detail for lower-resolution display or transfer.

Choose tolerance in spatial units and retain the source for precise analysis. Keep the geometry type and SRID in the review.

Check your work Reduce uses a 0.1-coordinate-unit tolerance. Compare point counts and check the output validity.

Practice SQL

Open in SQL Flow

Open 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'LINESTRING(0 0, 1 0.05, 2 0, 3 0)', 0);
SELECT @shape.Reduce(0.1).STAsText() AS simplified_line, @shape.STNumPoints() AS source_points, @shape.Reduce(0.1).STNumPoints() AS simplified_points,
       @shape.STSrid AS source_srid,
       @shape.STIsValid() AS source_is_valid;

Open Microsoft Learn for full syntax, permissions, and details for your version.