Opened 6 years ago

Closed 5 years ago

#3670 closed defect (fixed)

Tolerance silently ignored in ST_RemoveRepeatedPoint for multipoint

Reported by: strk Owned by: pramsey
Priority: blocker Milestone: PostGIS 2.4.0
Component: postgis Version: 2.3.x
Keywords: Cc:

Description

According to http://postgis.net/docs/ST_RemoveRepeatedPoints.html ST_RemoveRepeatedPoints considers vertices within the tolerance of one another as identical in case a tolerance is given, but this does NOT happen for MULTIPOINT.

Also, I suggest to specify that for lines the distance between points is only computed for *consecutive* points.

Change History (10)

comment:1 by robe, 6 years ago

Milestone: PostGIS 2.3.1PostGIS 2.3.2

comment:2 by robe, 5 years ago

Milestone: PostGIS 2.3.2PostGIS 2.4.0

comment:3 by pramsey, 5 years ago

Resolution: wontfix
Status: newclosed

I don't necessarily agree with the premise of the ticket: for multi-point the operation of the function doesn't make much sense. Maybe use unaryunion for duplicate point removal in multipoint?

comment:4 by pramsey, 5 years ago

See lwmpoint_remove_repeated_points and add a tolerance there. It's expensive, but hey!

comment:5 by pramsey, 5 years ago

Priority: mediumblocker

comment:6 by pramsey, 5 years ago

Resolution: wontfix
Status: closedreopened

Doco is correct, current code removes exact repeated points, and shouldn't be too hard to make it respect tolerance, though algorithm in there is O(n2). Forgot to re-open ticket, am actually going to add the tolerance support.

comment:7 by robe, 5 years ago

Milestone: PostGIS 2.4.0PostGIS 2.5.0

comment:8 by robe, 5 years ago

Milestone: PostGIS 2.5.0PostGIS 2.4.0

pramsey this one seems safe enough to do even after I release beta. You can even do this in 2.3.4 if you are so energized after 6 days of basking in the sun.

comment:9 by pramsey, 5 years ago

OK, so made the code match the doco, seemed reasonable for this corner case even if the code isn't so efficient. Done in trunk at r15637

comment:10 by pramsey, 5 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.