[postgis-devel] ST_Union for TopoGeometry (misnamer?)
Sandro Santilli
strk at kbt.io
Thu Feb 18 00:18:12 PST 2021
On Wed, Feb 17, 2021 at 11:19:28AM -0800, Paul Ramsey wrote:
> What does the resulting TopoGeom look like? If I put together a topogeom with A areas and one with B areas do I end up with a new one with > A+B areas? that's a "coverage union" in Esri terms, but more like an "overlay" in the words we usually use in postgis land. A "union" of sets of areas should result in fewer areas (assuming the areas are not all disjoint).
Overnight I've been thinking that ST_Union is not good because my
current implementation basically *modifies* the target geometry,
rather than leaving the inputs untouched and return a NEW object.
But I also remembered we have these functions:
TopoGeom_addElement(tg topology.TopoGeometry, el topology.TopoElement)
TopoGeom_remElement(tg topology.TopoGeometry, el topology.TopoElement)
So we could as well call the function I'm workin on:
TopoGeom_remElement(src topology.TopoGeometry, tgt topology.TopoElement)
Seems to be the perfect fit.
--strk;
More information about the postgis-devel
mailing list