Opened 19 months ago
Last modified 19 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.
wrong version of postgis mentioned. Found it in earlier version, but also tested it in 3.3.x