Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
Returns a copy of the geometry with all points snapped to the specified grid.
The cell size for the grid.
Returns the geometry with all points snapped to the grid.
The spatial reference system identifier of the result is the same as the spatial reference system of the geometry-expression.
The ST_SnapToGrid method can be used to reduce the precision of data by snapping all
points in a geometry to a grid defined by the origin and cell size.
The X and Y coordinates are snapped to the grid; any Z and M values are unchanged.
Reducing precision may cause the resulting geometry to have different properties.
For example, it may cause a simple linestring to cross itself, or it may generate an invalid
Each spatial reference system defines a grid that all geometries
are automatically snapped to. You can not store more precision than
this predefined grid.
By default, ST_SnapToGrid uses the original format for a geometry, if it is available. Otherwise, the internal format is used.
For more information about internal and original formats, see STORAGE FORMAT clause, CREATE SPATIAL REFERENCE SYSTEM statement.
SQL/MM (ISO/IEC 13249-3: 2006)