<div dir="ltr">I've opened a draft PR [1] with the change under discussion, so you can get an idea of the changes requires to GEOS tests.<div><br></div><div>One thing I hadn't anticipated is that some GEOS clients (at least, PostGIS and shapely) rely on unmerged outputs as a way of splitting a linear geometry. (Is this the usage you refer to above, Martin?) Since the next GEOS release will include a direct "split" operation, it _should_ be possible for those implementation to just switch from GEOSDifference to GEOSSplit.<div><br></div><div>Dan</div><div><br></div><div>[1] <a href="https://github.com/libgeos/geos/pull/1459" target="_blank">https://github.com/libgeos/geos/pull/1459</a></div></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Jun 26, 2026 at 4:11 PM Martin Davis <<a href="mailto:mtnclimb@gmail.com">mtnclimb@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">The original idea behind leaving linear overlay results unmerged was to allow the user to choose whether they wanted to incur the overhead of line merging. However, as the Polygon-Polygon example makes obvious, for some types of input this strategy produces non-intuitive results. So it seems like a good idea to provide merging automatically.<div><br></div><div>One downside is that then overlay cannot be used as a way to perform noding of sets of LineStrings. A way of preserving this would be to merge only line segments which orginated in the same parent LineString. Actually, it's probably necessary to merge only segments which were contiguous in the parent. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 20, 2026 at 7:00 AM Daniel Baston <<a href="mailto:dbaston@gmail.com" target="_blank">dbaston@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I've noticed that the GEOS overlay code has the capability to merge linear output geometries, using LineBuilder::addResultLinesMerged. However, this capability has never been enabled. GEOS clients ([1], [2]) sometimes end up calling GEOSLineMerge as a follow-up step to overlay, but this is inefficient and cumbersome. (Among other things, GEOSLineMerge silently drops any non-linear inputs.)</div><div><br></div><div>Does it make sense to consider enabling this behavior? It would be helpful for reconstructing CompoundCurves, which have no way to retain their complex parentage information through the noding journey. I guess we would need a GEOSUnionWithParams, GEOSIntersectionWithParams, etc...</div><div><br></div><div>Dan</div><div><br></div><div>[1] <a href="https://github.com/qgis/QGIS/blob/b298119a5b09ae3903596ec2ffaf8aaff7ba78a3/src/core/geometry/qgsgeos.cpp#L1985" target="_blank">https://github.com/qgis/QGIS/blob/b298119a5b09ae3903596ec2ffaf8aaff7ba78a3/src/core/geometry/qgsgeos.cpp#L1985</a></div><div>[2] <a href="https://github.com/OSGeo/gdal/blob/ad495515b681bfb5f660f5de17e9ef1c2c8f153f/apps/gdalalg_vector_dissolve.cpp#L134" target="_blank">https://github.com/OSGeo/gdal/blob/ad495515b681bfb5f660f5de17e9ef1c2c8f153f/apps/gdalalg_vector_dissolve.cpp#L134</a></div><div><br></div><div><br></div><div><br></div></div>
</blockquote></div>
</blockquote></div>