Skip to main content
Solved

SpatialRelator propagates wrong feature type ?

  • October 19, 2017
  • 3 replies
  • 13 views

lifalin2016
Supporter
Forum|alt.badge.img+38

Hi,

I'm trying to use a workflow with dynamic output schemas, and uses fme_feature_type to fan out my datasets. Embedded in this workflow is a SpatialRelator.

However, it seems like this transformer propagates the feature type of the "supplier" even though the attributes are set to "merge supplier" with "use requestor" in case of conflict. Apparently the feature type is not in conflict ??

Is this a known problem, or is it WAD ?

I'm using a workaround to save the "requestor" feature type into a separate attribute, but it would be nice if the transformer worked better.

Cheers

Best answer by redgeographics

I think @takashi is right. If you only use the SpatialRelator the requestors will retain their fme_feature_type, but if you then use a ListExploder it will overwrite the fme_feature_type of the requestor with the one from the supplier.

That's what the ListExploder does I'm afraid.

There is a workaround:

  1. Expose the fme_feature_type attribute on the suppliers
  2. Set the SpatialRelator to only add selected attributes and don't select the fme_feature_type attribute

That should do it.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • 7843 replies
  • October 19, 2017
perhaps is there a ListExploder to explode the list generated by the SpatialRelator?

 

 


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3704 replies
  • Best Answer
  • October 20, 2017

I think @takashi is right. If you only use the SpatialRelator the requestors will retain their fme_feature_type, but if you then use a ListExploder it will overwrite the fme_feature_type of the requestor with the one from the supplier.

That's what the ListExploder does I'm afraid.

There is a workaround:

  1. Expose the fme_feature_type attribute on the suppliers
  2. Set the SpatialRelator to only add selected attributes and don't select the fme_feature_type attribute

That should do it.


lifalin2016
Supporter
Forum|alt.badge.img+38
  • Author
  • Supporter
  • 592 replies
  • October 23, 2017

I think @takashi is right. If you only use the SpatialRelator the requestors will retain their fme_feature_type, but if you then use a ListExploder it will overwrite the fme_feature_type of the requestor with the one from the supplier.

That's what the ListExploder does I'm afraid.

There is a workaround:

  1. Expose the fme_feature_type attribute on the suppliers
  2. Set the SpatialRelator to only add selected attributes and don't select the fme_feature_type attribute

That should do it.

Hi red,

 

 

Ah, I needed to upgrade the SpatialRelator (and ListExploder) transformers to the latest versions before I got the "selected attributes" possibility :-)

 

 

To clarify, the "fme_feature_type" of the features being output from SpatialRelator are all "SpatialRelator_OUTPUT", but the list "_relationsships[].fme_feature_type" are all equal to the SpatialRelator's suppliers' feature_type. But after ListExplode, the feature all have type "ListExploder_ELEMENTS". At least according to Data Inspector, which I'm not sure is correct.

 

 

So I added a couple of inspectors, one after SpatialRelator and one after ListExplode, and the former reports the correct feature-type, whereas the latter report the wrong (from the SpatialRelator suppliers, i.e. "_relationsships[].fme_feature_type".

 

 

So it looks like it's WAD behaviour after all, as the relationships supposedly defines what the requester feature encounters, including their feature-types.

 

 

So to enforce the requester feature-types, I'll stick to my work-around for now then :-)

 

 

Ps! The two transformers are located inside a custom transformer, and the only attribute in "selected attributes" were "fme_feature_type", so that unfortunately didn't help med out. But if located in the main window, it might just work nicely.

 

 

Cheers