Opened 18 months ago

Last modified 18 months ago

#5398 new defect

ST_RemoveRepeatedPoints behaves unexpectedly on 3D input

Reported by: pimvdhelm Owned by: pramsey
Priority: medium Milestone:
Component: postgis Version: 3.3.x
Keywords: 3D, tolerance, ST_RemoveRepeatedPoints Cc: pimvdhelm

Description

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.

Change History (1)

comment:1 by pimvdhelm, 18 months ago

Milestone: PostGIS 3.2.6
Version: 3.2.x3.3.x

wrong version of postgis mentioned. Found it in earlier version, but also tested it in 3.3.x

Note: See TracTickets for help on using tickets.