[postgis-tickets] [PostGIS] #5401: ST_Difference silently giving us wrong results
PostGIS
trac at osgeo.org
Thu Jun 15 06:56:41 PDT 2023
#5401: ST_Difference silently giving us wrong results
--------------------------------+---------------------------
Reporter: Lars Aksel Opsahl | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 3.3.4
Component: postgis | Version: 3.3.x
Resolution: | Keywords:
--------------------------------+---------------------------
Comment (by strk):
Lars this ticket is best used to tackle the unexpected precision
reduction, so the aim here would be to reproduce the issue, not to work
around it by using a different SQL statement.
As neither me nor Paul are able to reproduce the issue it isn't easy for
us to check if the this bug was already fixed or it depends on some other
characteristic on those systems that are still affected.
It would help in trying to reproduce the issue to first of all avoid
movable parts, so for example you could save the two operands of the
ST_Difference call in a table have some static data to work with. This
could be done as such:
{{{
CREATE TABLE t5401 AS SELECT
( SELECT ST_Collect(distinct pt.geo) FROM all_area pt WHERE
ST_IsValid(pt.geo)) g1,
( SELECT ST_Union(geo) AS geo FROM used_area u WHERE ST_IsValid(geo) ) g2;
}}}
The check if you can reproduce the bug with something like:
{{{
SELECT ST_Difference(g1,g2) FROM t5401;
}}}
Then attach a dump of that table in this ticket.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5401#comment:15>
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