[PostGIS] #6037: st_union with gridSize produces unexpected result

PostGIS trac at osgeo.org
Fri Jan 16 07:26:12 PST 2026


#6037: st_union with gridSize produces unexpected result
------------------------------------+---------------------
  Reporter:  Asger Skovbo Petersen  |      Owner:  pramsey
      Type:  defect                 |     Status:  new
  Priority:  medium                 |  Milestone:
 Component:  postgis                |    Version:  3.6.x
Resolution:                         |   Keywords:
------------------------------------+---------------------
Comment (by Asger Skovbo Petersen):

 If the current behavior is intended, I think the documentation should be
 updated. Currently, it says:

 “For the operation to give predictable results all the input vertices must
 fall already on the specified grid.”

 In practice, this is not sufficient. The input geometry needs to be
 precision-reduced with ST_ReducePrecision, because this function does more
 than just aligning vertices to a grid. In particular, it can also “remove
 features below the tolerance” which is not further explained in the
 current documentation. Clarifying this distinction would help users
 understand why ST_Union with gridSize may give unexpected results even
 when inputs appear grid-aligned.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/6037#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list