[postgis-tickets] [PostGIS] #4711: ST_Union loses precision on complex multilinestring geometries

PostGIS trac at osgeo.org
Thu Jul 2 21:47:59 PDT 2020


#4711: ST_Union loses precision on complex multilinestring geometries
-------------------------+--------------------------
  Reporter:  dannytoone  |      Owner:  pramsey
      Type:  defect      |     Status:  new
  Priority:  medium      |  Milestone:  PostGIS GEOS
 Component:  postgis     |    Version:  3.0.x
Resolution:              |   Keywords:
-------------------------+--------------------------

Comment (by mdavis):

 Replying to [comment:7 dannytoone]:
 > On the subject of snapping, how would you go about doing that? Snapping
 everything to a grid before unioning seems to work to some degree, but
 some of the geometries still end up jagged, and some still end up squared.

 The snapping mentioned above is a new technique developed for the
 forthcoming OverlayNG.  The algorithm is surprisingly simple:  (i) scan
 all vertices of the input geometries and snap each one to previously
 scanned ones;  (ii) scan all segments and snap them at intersections and
 to nearby anchor points.  This is liable to introduce topology collapses,
 but these are removed by the overlay algorithm when it reforms the
 topology.

 This is a heuristic algorithm - i.e. the snapping can produce situations
 with topology so invalid that it causes the overlay to fail.  But these
 are very rare in practice, and so far can all be handled by just snapping
 more aggresively.

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