Opened 5 years ago
Closed 5 years ago
#4493 closed defect (fixed)
ST_RemoveRepeatedPoints returned geometry bbox might be incorrect
Reported by: | Algunenano | Owned by: | Algunenano |
---|---|---|---|
Priority: | high | Milestone: | PostGIS 2.3.11 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
When the tolerance is > 0, the resulting geometry bbox might change but it isn't updated:
Example:
# WITH geom AS ( SELECT ST_RemoveRepeatedPoints('POLYGON((0 0, 10 0, 10 10, 10.5 10.5, 10 10, 0 10, 0 0))', 1) as g ) Select ST_AsText(g) as geometry, postgis_getbbox(g) AS box from geom; geometry | box ------------------------------------+-------------------- POLYGON((0 0,10 0,10 10,0 10,0 0)) | BOX(0 0,10.5 10.5) (1 row) Time: 0.635 ms
Change History (7)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Wait, how do removing _repeated_ points can change the bounding box ?
Because it has a tolerance value, so different points might be removed.
comment:3 by , 5 years ago
Ah right, with tolereance value, yep. So this bug entered codebase in 2.2, if you want to backport the fix till there. Reference: #1137
Note:
See TracTickets
for help on using tickets.
Wait, how do removing _repeated_ points can change the bounding box ? I'd think if bounding box changes then something _more_ than _repeated_ points have been removed, which would be a bug