Returns a copy of the geometry with all points snapped to the specified grid.
SELECT NEW ST_LineString( NEW ST_Point( 1.010101, 20.202020 ), TREAT( NEW ST_Point( 1.010101, 20.202020 ).ST_SnapToGrid( NEW ST_Point( 0.0, 0.0 ), POWER( 2, -6 ), POWER( 2, -7 ), 0.0, 0.0 ) AS ST_Point ), TREAT( NEW ST_Point( 1.010101, 20.202020 ).ST_SnapToGrid( NEW ST_Point( 1.01, 20.2 ), POWER( 2, -6 ), POWER( 2, -7 ), 0.0, 0.0 ) AS ST_Point ) )
The first point of the linestring is the point ST_Point( 1.010101, 20.202020 ), snapped to the grid defined for SRID 0. The second point of the linestring is the same point snapped to a grid defined with its origin at point ( 0.0 0.0 ), where cell size x is POWER( 2, -6 ) and cell size y is POWER( 2, -7 ). The third point of the linestring is the same point snapped to a grid defined with its origin at point ( 1.01, 20.2 ), where cell size x is POWER( 2, -6 ) and cell size y is POWER( 2, -7 ).
SQL/MM (ISO/IEC 13249-3: 2006) Vendor extension