[postgis-devel] Re: [PostGIS] #101: ST_Union on one-row table doesn't union

PostGIS trac at osgeo.org
Thu Jun 4 12:23:12 PDT 2009


#101: ST_Union on one-row table doesn't union
----------------------+-----------------------------------------------------
  Reporter:  pramsey  |       Owner:  pramsey      
      Type:  defect   |      Status:  closed       
  Priority:  medium   |   Milestone:  postgis 1.4.0
 Component:  postgis  |     Version:  1.4          
Resolution:  invalid  |    Keywords:               
----------------------+-----------------------------------------------------
Comment (by robe):

 Yah its not worth fixing.  Its not a common thing anyway.  If its deep in
 GEOS too many places to deal with and its just sort of unexpected behavior
 not necessarily wrong behavior.

 I'll paste Martin's comments here for future reference and my comment --

 its useful for dissolving valid multipolygons such as US States even if it
 is one big multipolygon (you get fewer by dissolving).

 -----Original Message-----
 From: Martin Davis [mailto:mbdavis at refractions.net]
 Sent: Thu 6/4/2009 2:52 PM
 To: Paul Ramsey; PostGIS Development Discussion; Obe, Regina
 Subject: Re: [postgis-devel] Re: [PostGIS] #101: ST_Union on one-row table
 doesn't union

 Paul, Regina:

 Since valid MultiPolygons can't intersect except at points, the union of
 a MultiPolygon is exactly that MultiPolygon.  So technically the
 short-circuit in the PostGIS code is reasonable.

 However, it's useful behaviour to be able to use Unary Union to "clean
 up" self-intersecting MultiPolygons.  This is the way JTS works.  It
 *always* performs a union, even on a single geometry.  This also allows
 Unary Union to be used as a simple way of noding a set of linestrings
 (since the union of linestrings doesn't merge resultants together).

 So I'd vote for removing the optimization from PostGIS - or at least
 providing an entry point to Unary Union which always does some crunching.

 Martin

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/101#comment:14>
PostGIS <http://trac.osgeo.org/postgis/>
PostGIS


More information about the postgis-devel mailing list