Skip to main content
Solved

Feature creation as part of the data flow


salvaleonrp
Enthusiast
Forum|alt.badge.img+16

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

nielsgerrits wrote:

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.

View original
Did this help you find an answer to your question?

8 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

Sounds like a job for the NoFeatureTester.


salvaleonrp
Enthusiast
Forum|alt.badge.img+16
  • Author
  • Enthusiast
  • 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+54
salvaleonrp wrote:

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+16
  • Author
  • Enthusiast
  • 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+54
salvaleonrp wrote:

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+16
  • Author
  • Enthusiast
  • March 21, 2023
nielsgerrits wrote:

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+54
  • Best Answer
  • March 21, 2023
nielsgerrits wrote:

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+16
  • Author
  • Enthusiast
  • March 21, 2023
nielsgerrits wrote:

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!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings