Skip to main content
Solved

How to chose flow based on if data exist in one dataset, if it doesnt exist a point should be created

  • May 11, 2021
  • 2 replies
  • 27 views

I got a feature reader that reads in excel data. If data exists i create points from that data. If data doesn't exist i need to create a point myself based on center of a polygon with "centerpointreplacer" transformer.

 

How can I chose flow based on that scenario? If I can create points from excel then I dont want the centerpointreplacer to run.

Best answer by ebygomm

There is a custom transformer called the NoFeaturesTester. If you send no features into this, it will output a feature via the Noinput port if no feature is received.

You can also use a FeatureMerger in the following way to do the same thing

Capture 

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.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • May 11, 2021

There is a custom transformer called the NoFeaturesTester. If you send no features into this, it will output a feature via the Noinput port if no feature is received.

You can also use a FeatureMerger in the following way to do the same thing

Capture 


  • Author
  • May 11, 2021

There is a custom transformer called the NoFeaturesTester. If you send no features into this, it will output a feature via the Noinput port if no feature is received.

You can also use a FeatureMerger in the following way to do the same thing

Capture 

Thanks I will try this in my workspace.