I need to update environmental data in our system. The input data comes from an ESRI Shapefile, and I am using FME 2021.2. The output is stored in Oracle Spatial.
However, the system that reads the data from Oracle only accepts simple polygons. When I try to insert multipolygons, part of the geometry is ignored by that system.
Is there a way in FME to convert multipolygons into single polygons while maintaining a 1:1 relationship between input and output features?
If I use the Deaggregator, the number of records grows exponentially, which is not viable for our database.
I also started working with FME recently, so I may be missing a simpler or recommended approach.
What would be the recommended way in FME to transform multipolygons into valid simple polygons without increasing the number of features?
Best answer by s.jager
What would be the recommended way in FME to transform multipolygons into valid simple polygons without increasing the number of features?
That’s not possible without losing information/data, or changing your data model in the receiving database. A multi-polygon consists of 2 or more simple polygons. If you can only use a single one per feature, there’s no way to store that info without removing every other polygon except 1. So you lose information. If the multi-polygons are touching, you could try a dissolver - but I’m fairly sure that won’t solve all cases.
If you can, you could change your data model, where you have a table of features (without)geometry) and a table of geometry, with a 1 - n relationship. But that involves changing your tables/foreignkeys etc., so may have too much impact.
You could try Deaggregator and then an Aggregator again, on the off chance that that generates the multipolygon in a slightly different way that the system reading it from Oracle doesn’t reject it.
But broadly speaking, turning a multipolygon into a simple polygon while maintaining that 1:1 relationship is not possible. Because a mutlipolygon consists of multiple polygons...
What would be the recommended way in FME to transform multipolygons into valid simple polygons without increasing the number of features?
That’s not possible without losing information/data, or changing your data model in the receiving database. A multi-polygon consists of 2 or more simple polygons. If you can only use a single one per feature, there’s no way to store that info without removing every other polygon except 1. So you lose information. If the multi-polygons are touching, you could try a dissolver - but I’m fairly sure that won’t solve all cases.
If you can, you could change your data model, where you have a table of features (without)geometry) and a table of geometry, with a 1 - n relationship. But that involves changing your tables/foreignkeys etc., so may have too much impact.
Thank you both for the explanations and suggestions.
It makes sense that converting a multipolygon into a single simple polygon while keeping a strict 1:1 relationship is not really feasible without losing information. I appreciate the clarification.
For now, I will proceed using the Deaggregator approach and handle the resulting features in the database