OverlayNG: Merge linear outputs#1459
Conversation
|
I've updated the XML tests to expect merged output, with one exception. |
|
It appears PostGIS is relying on the splitting side-effect of So PostGIS would need to be updated to use |
| template<> | ||
| void object::test<12> () | ||
| { | ||
| // TODO: Should Z values be averaged? |
There was a problem hiding this comment.
They are in overlay, so they should be in this operation too, I think is consistent. Probably better than unpredictable ordering based first-in / last-in selection.
There was a problem hiding this comment.
Agree that averaging is desirable (if the cost is not too great), but after giving the implementation some thought I think it's out-of-scope for this changeset. It's the job of the Noder to average Z values but the noders used in CoverageUnion deliberately avoid the intersection calculations that would produce averages. You can see the same winner-take-all behavior in the polygon CoverageUnion, which is unaffected by this PR:
geosop -a "GEOMETRYCOLLECTION (POLYGON Z ((0 0 0, 1 0 1, 0 1 2, 0 0 0)), POLYGON Z ((1 0 100, 1 1 200, 0 1 300, 1 0 100)))" coverageUnionNG
POLYGON Z ((1 0 1, 0 0 0, 0 1 2, 1 1 200, 1 0 100))
pramsey
left a comment
There was a problem hiding this comment.
Can we get a NEWS entry for this feature that notes changes in behaviour for downstream projects (what previously returned a MULTILINESTRING may now return a LINESTRING)?
22131a4 to
77eeb1a
Compare
|
It looks like shapely also relies on the current behavior of https://github.com/shapely/shapely/blob/e10c6da077744005290f77eaa725777d1c631f66/shapely/ops.py#L362 |
|
I have pushed a change to PostGIS to use GEOSSplit over GEOSDifference in the ST_Split function, from GEOS 3.15 and on. |
2e5cddd to
f0a718a
Compare
As discussed in https://lists.osgeo.org/pipermail/geos-devel/2026-May/011167.html (May) and https://lists.osgeo.org/pipermail/geos-devel/2026-June/011179.html (June)
I have not modified the XML tests yet.