[postgis-tickets] [PostGIS] #4182: Unexpected TopologyException during ST_Union aggregate function with valid polygons

PostGIS trac at osgeo.org
Fri Aug 23 07:03:53 PDT 2019


#4182: Unexpected TopologyException during ST_Union aggregate function with valid
polygons
-----------------------+--------------------------
  Reporter:  blaggner  |      Owner:  pramsey
      Type:  defect    |     Status:  new
  Priority:  medium    |  Milestone:  PostGIS GEOS
 Component:  postgis   |    Version:  2.3.x
Resolution:            |   Keywords:
-----------------------+--------------------------

Comment (by komzpa):

 Hey there,

 (I'm original author of LostGIS).

 I didn't do ST_Safe_Union because I didn't know back then how to build it
 as an aggregate that wraps aggregate.

 The reason the ST_Safe_* buffers geometries and not buffers them back was
 that there was a separate "deoverlap" build phase, and it was more
 convenient to get slightly overlapping geometries. Result lives at
 https://eu.wargaming.net/globalmap/.

 The problem of large slivers is a real thing. I had a lot of it when was
 trying to union and subdivide the GADM polygons.

 Here's an archive of functions before it got packaged as extension:
 https://github.com/wgnet/globalmap/tree/master/code/postgis_wrappers -
 ST_FilterSmallRings was used to get rid of slivers.

 What I've used for slivers was along the lines of
 ST_Safe_Repair(ST_Buffer(ST_Safe_Repair(ST_Collect(ST_Safe_Repair(geom))),0)).

 A solution to the madness was
 https://github.com/postgis/postgis/pull/228/files - I believe Juno still
 uses a build with that thing enabled, but it was reverted upstream.

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