[postgis-tickets] [PostGIS] #5398: ST_RemoveRepeatedPoints behaves unexpectedly on 3D input

PostGIS trac at osgeo.org
Mon Jun 12 04:42:50 PDT 2023


#5398: ST_RemoveRepeatedPoints behaves unexpectedly on 3D input
-------------------------------------------------+-------------------------
 Reporter:  pimvdhelm                            |      Owner:  pramsey
     Type:  defect                               |     Status:  new
 Priority:  medium                               |  Milestone:  PostGIS
                                                 |  3.2.6
Component:  postgis                              |    Version:  3.2.x
 Keywords:  3D, tolerance,                       |
  ST_RemoveRepeatedPoints                        |
-------------------------------------------------+-------------------------
 As an examply I use a polygon that contains two consecutive points with
 the same x and y coordinate, but a z-value with around 0.0001 meters
 distance.

 Applying the function without any tolerance, will not remove the point.
 This can be considered as correct behaviour, since the  points are indeed
 not equal.

 However using the tolerance with a value of 0.001 will not remove one
 point either. Which is unexpected. However one can debate that this is
 intended behavior since the z-value is not considered in the tolerance but
 only the x and y.

 ST_ReducePrecision has similar behaviour. It neglects to apply the
 precision on the z-axis. However this functions is not considered to work
 on 3D data, so that makes it valid.

 If ST_RemoveRepeatedPoints only works on fully equal points with tolerance
 only affecting the x and y this should be made clear in the description of
 the function, or keep it as a 2D only valid function.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5398>
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