Skip to main content
Question

IFMEFeature with aggregated/multiple geometry

  • September 12, 2024
  • 4 replies
  • 72 views

pehrs
Contributor
Forum|alt.badge.img+2

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?

 

4 replies

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • September 12, 2024

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


pehrs
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • September 12, 2024

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.


evieatsafe
Safer
  • Safer
  • September 18, 2024

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.


pehrs
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • September 19, 2024

Thanks, issue is solved.