Skip to main content

We have a reader plugin (c++) that should be able to set aggregated/ multiple geometry to an IFMEFeature.

For example:

We have only several IFMEGeometry objects. These IFMEGeometry objects should be set to an IFMEFeature. So that we have finally an IFMEFeature that consists of several different geometry objects/ parts.

                                                         IFMEFeature

IFMEGeometry_Part_1    IFMEGeometry_Part_2    ….      IFMEGeometry_Part_n

fme_type = fme_area

fme_geometry = fme_aggregate

fme_feature_type = DepthArea

 

How can we solve this?

 

Try GeometryRefiner.  This will convert homogenous Aggregate Geometries to Multis (as well as to simply polygons if possible).


I guess GeometryRefiner is only available in FME Desktop Workbench.

But this issue has to be resolved programmatically (c++) in the reader plugin and not in FME Desktop.


Hi @pehrs I talked with some colleagues and this is some of the advice they suggest:

  • if you are asking about how to get a bunch of individual IFMEGeometry objects into an IFMEAggregate.  Then 
    IFMEAggregate* fme::IGeometryTools::createAggregate() const and IFMEAggregate::appendPart(IFMEGeometry* geometry) would help.
  • You would then need to put your aggregate onto a feature before calling the method 
    virtual void fme::v1_1::IGeometryTools::createMultipleGeometryFromAggregate(IFMEFeature & feature) const which is exposed on the FMEObjects API rather than the Plugin API.

I hope this helps, let us know if you have any other questions.


Thanks, issue is solved.


Reply