Skip to content
🎉 Apache Sedona 1.8.1 is now available! Check out the new features and improvements.

ST_ReducePrecision

Introduction: Reduce the decimals places in the coordinates of the geometry to the given number of decimal places. The last decimal place will be rounded.

Format: ST_ReducePrecision (A: Geometry, B: Integer)

Since: v1.5.0

Example:

SELECT ST_ReducePrecision(ST_GeomFromWKT('Point(0.1234567890123456789 0.1234567890123456789)')
    , 9)

The new coordinates will only have 9 decimal places.

Output:

POINT (0.123456789 0.123456789)