[postgis-tickets] [PostGIS] #4991: st_union of single row should keep the row intact

PostGIS trac at osgeo.org
Thu Sep 16 12:37:00 PDT 2021


#4991: st_union of single row should keep the row intact
----------------------+---------------------------
  Reporter:  michal   |      Owner:  pramsey
      Type:  defect   |     Status:  closed
  Priority:  medium   |  Milestone:  PostGIS 3.1.5
 Component:  postgis  |    Version:  3.1.x
Resolution:  invalid  |   Keywords:
----------------------+---------------------------

Comment (by michal):

 well, until today, I did no know `ST_MemUnion` exists. I should read the
 docs more.

 after reading docs for `ST_Union` there is no mention that it does not sew
 linestrings. "Unions the input geometries, merging geometry to produce a
 result geometry with no overlaps." - for me, this means that it sews
 linestrings as well as polygons

 `SELECT ST_AsText(ST_union( ST_GeomFromText('MULTILINESTRING((-44 -34,-45
 -33),(-44 -34,-46 -32))') ));` removes the overlap but imho it should
 remove the boundary between the linestrings (producing a linestring, not
 multilinestring). just as it sews polygons and does not leave border
 between them: `SELECT ST_AsText(ST_union(
 ST_GeomFromText('MULTIPOLYGON(((-44 -34, -45 -33, -10 -10,-44 -34)),((-44
 -34,-46 -32, -50 -50, -44 -34)))') ));` - the result is polygon, not
 multipolygon.

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