Tuesday 16 April 2019

fme - Export multipolygons into a GeoPackage


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.


GeometryCoercer


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.


AttributeCreator


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.


FME Inspector 2018.0.0.1


Deaggregating them before aggregating solved this:



2018.0.0.1 FME Desktop Workspace


AggregatorParameters


See the result in QGIS.


QGIS Desktop 3.0.2


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...