In FME, I use the Aggregator to merge polygons based on one attribute (desnat in my example file).
- When the output is Shapefile, multipolygons are created and all works fine.
- When the output is OGC Geopackage or Spatialite, FME creates a
GeometryCollection instead of multipolygons (and I can't use
GeometryCollection with others GIS softwares like QGIS).
I tried to use the GeometryCoercer to force the geometry in fme_multi, but nothing is exported.
I tried to create a new attribute geopackage_type with value wkb_multi_polygon. The new attribute is created but the GeometryCoercer can't export anything.
If I remove the GeometryCoercer and I keep the AttributeCreator, the Geopackage is created but with a GeometryCollection and not multipolygons.
Answer
Not sure which versions you used? I was able to reproduce your problem in FME Desktop 2018.0.0.1 / QGIS Desktop 3.0.2
This behavior is likely to be caused by nested aggregates, created by the Aggregator as the source features already containes aggregates. For example the feature with idobj d3a4eed9-e042-4689-b050-d42c6bf6f248 is an aggregate from 2 areas.
Deaggregating them before aggregating solved this:
See the result in QGIS.
No comments:
Post a Comment