Opened 14 years ago
Closed 13 years ago
#922 closed enhancement (fixed)
Have ST_Union aggregate use UnaryUnion from GEOS-3.0.0
Reported by: | strk | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.0.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
Current code of PostGIS uses GEOSUnionCascaded only for polygons, and that's even correct because the GEOS C-API GEOSUnionCascade would throw an exception if anything but (multi)Polygons are given.
Instead the new GEOSUnaryUnion interface from GEOS-3.0.0 accepts any kind of geometry. Internally uses Cascaded union for polygons but also does special handling of points and lines. See http://trac.osgeo.org/geos/ticket/392 for an example case in which the UnaryUnion works whereas normal union doesn't.
Always using UnaryUnion when build against GEOS-3.3.0 would then simplify the code and improve union robustness.
Change History (3)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Nevermind, of course topology can only be enabled with GEOS >= 3.3 so since this only kicks it with GEOS >= 3.3 we should be fine if I just change the expected.
I've got this implemented, but it has a single regression "failure" in topology.
As you can see this isn't really a regression failure. Unfortunately, the topology regression suite is so tightly coupled together it's quite hard for me to exempt this case while also allowing this functionality to be conditional on GEOS 3.3. Basically if GEOS 3.3 is present the test will fail, if not it will pass. Or the reverse if I change the expected.