[postgis-tickets] [PostGIS] #4991: st_union of single row should keep the row intact
PostGIS
trac at osgeo.org
Tue Sep 21 04:47:26 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 robe):
ST_MemUnion hasn't been touched in eons and does a state
ST_Union(geom1,geom2). At a glance ST_Union(geom1,geom2) returns the non-
null geometry if one of the geometries is null (as would be the case with
an ST_MemUnion with only one geometry). I'm surprised this doesn't use
ST_UnaryUnion :) so there is another function we need to clarify the
behavior.
At anyrate ST_Union agg is generally much more efficient than ST_MemUnion
if you have many geometries. That said I'd go with
ST_LineMerge(ST_Union(..)) for performance unless you never have more than
a few geometries.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4991#comment:11>
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