Solved

Feature creation as part of the data flow


Badge +10

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.

icon

Best answer by nielsgerrits 21 March 2023, 13:48

View original

8 replies

Userlevel 6
Badge +31

Sounds like a job for the NoFeatureTester.

Badge +10

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

Userlevel 6
Badge +31

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?

Badge +10

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.

Userlevel 6
Badge +31

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?

Badge +10

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.

Userlevel 6
Badge +31

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.

Badge +10

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!

Reply