[postgis-tickets] [PostGIS] #4738: ST_Union creates wrong result

PostGIS trac at osgeo.org
Thu Aug 13 04:02:59 PDT 2020


#4738: ST_Union creates wrong result
-----------------------+---------------------------
  Reporter:  laopsahl  |      Owner:  pramsey
      Type:  defect    |     Status:  new
  Priority:  medium    |  Milestone:  PostGIS 3.1.0
 Component:  postgis   |    Version:  3.0.x
Resolution:            |   Keywords:
-----------------------+---------------------------

Comment (by laopsahl):

 If you look at the last query and change that to use ST_AsText, the lines
 seems not to collapse.
 And in addition to get a more correct result it's also much faster with
 ST_AsText.


 {{{
 [local] lop at sl=# select count(*) as ST_AsBinary from (
 select (ST_Dump(ST_Union(i.geom))).geom from
 ( select ST_AsBinary(geom) as geom from test_input_snap where id > 100 and
 id < 600 ) as i
 ) as r;
  st_asbinary
 -------------
          343
 (1 row)

 Time: 2808.473 ms (00:02.808)
 [local] lop at sl=# select count(*) as ST_AsText from (
 select (ST_Dump(ST_Union(i.geom))).geom from
 ( select ST_AsText(geom) as geom from test_input_snap where id > 100 and
 id < 600 ) as i
 ) as r;
  st_astext
 -----------
      12091
 (1 row)

 Time: 336.900 ms

 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4738#comment:2>
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