Skip to main content
Solved

Feature creation as part of the data flow

  • March 20, 2023
  • 8 replies
  • 23 views

salvaleonrp
Enthusiast
Forum|alt.badge.img+20

Looking for a way to add a feature to a data flow based on a test condition where the feature count of the data stream is 1 or more? If there are no features being read from the reader source, no feature will be added.

 

Best way is probably to test feature count equal to null.

Best answer by nielsgerrits

But the NoInput feature from the NoFeatureTester_2 in your screenshot is a new created feature, which is the same a feature from a Creator transformer?

So, if there is only one feature, you want two features?

 

Then create a second stream from the AttributeKeeper, use a Counter(local, start at 0), Sampler (last 1 features), Tester (_count = 0). If this is true, then there is only one feature, and you can add this feature to the original feature.

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.

8 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • March 20, 2023

Sounds like a job for the NoFeatureTester.


salvaleonrp
Enthusiast
Forum|alt.badge.img+20
  • Author
  • Enthusiast
  • 151 replies
  • March 20, 2023

Thanks @nielsgerrits​ .

 

I'm still struggling with how to add or create the new feature. Any suggestions on when to add this new feature and what to use beside Creator?

 

image


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • March 20, 2023

Thanks @nielsgerrits​ .

 

I'm still struggling with how to add or create the new feature. Any suggestions on when to add this new feature and what to use beside Creator?

 

image

I think I misunderstood your question. Can you rephrase what you are trying to achieve?


salvaleonrp
Enthusiast
Forum|alt.badge.img+20
  • Author
  • Enthusiast
  • 151 replies
  • March 20, 2023

A Creator will add a feature to any data stream that it's being connected to, but I want this creation to be conditional.

 

If the data stream has no feature (In my screenshot it's the esriDTTraceNetwork output port), then the feature will not be added from the Creator.

If the data stream has features (In my screenshot it's the esriDTFeatureDataset output port), then the new feature will be added from the Creator.

 

Hope that's clearer.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • March 20, 2023

A Creator will add a feature to any data stream that it's being connected to, but I want this creation to be conditional.

 

If the data stream has no feature (In my screenshot it's the esriDTTraceNetwork output port), then the feature will not be added from the Creator.

If the data stream has features (In my screenshot it's the esriDTFeatureDataset output port), then the new feature will be added from the Creator.

 

Hope that's clearer.

But the NoInput feature from the NoFeatureTester_2 in your screenshot is a new created feature, which is the same a feature from a Creator transformer?


salvaleonrp
Enthusiast
Forum|alt.badge.img+20
  • Author
  • Enthusiast
  • 151 replies
  • March 21, 2023

But the NoInput feature from the NoFeatureTester_2 in your screenshot is a new created feature, which is the same a feature from a Creator transformer?

The new feature I need is on the Output port and not on the NOINPUT port.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • Best Answer
  • March 21, 2023

But the NoInput feature from the NoFeatureTester_2 in your screenshot is a new created feature, which is the same a feature from a Creator transformer?

So, if there is only one feature, you want two features?

 

Then create a second stream from the AttributeKeeper, use a Counter(local, start at 0), Sampler (last 1 features), Tester (_count = 0). If this is true, then there is only one feature, and you can add this feature to the original feature.


salvaleonrp
Enthusiast
Forum|alt.badge.img+20
  • Author
  • Enthusiast
  • 151 replies
  • March 21, 2023

But the NoInput feature from the NoFeatureTester_2 in your screenshot is a new created feature, which is the same a feature from a Creator transformer?

Yes.

 

This will work, not pretty but a lot less transformers to use. I just need to add a Sampler for what I need to do.

 

Thanks!