Oracle Spatial sdo_aggr_union filling inner rings

45 views Asked by At

While trying to perform an aggregation over a number of shapes which include inner rings (i.e. holes; see example pictures) I used sdo_aggr_union() from Oracle Spatial (12c), and realized that this operation creates new geometries "filling" the holes, which is something I didn't expect actually.

I wonder if that is expected, or it's a bug in 12c, or if there's something I can do to create a geometry which does not fill those holes, and create instead inner rings in the merged geometries.

1 - Original shapes (note some cuts, between adjacent shapes): enter image description here

2 - Result of sdo_aggr_union() (cuts are gone, but holes became new geometries) enter image description here

1

There are 1 answers

0
David Lapp On

I verified that this operations works fine in 19c, where holes are preserved by aggregate union. It's possible this was a bug in 12c, but 12c is now very old and past end-of-life. It is also possible that you have validation errors in your geometries. I suggest you move to a currently supported database version, validate and (if needed) rectify your geometries. You'll find validation functions in the package here and the rectify function here. Then try the aggregate union. I'll be glad to assist further if needed.