This is how I've solved it:
- Use an AttributeCreator to create an attribute "order" and set its value to 1
- Set up the AttributeManager with the Advanced Attribute Handling to look at the attributes of the previous feature.
- Set up a Conditional Value for the attribute order: if the value of Section or Direction of the previous feature is different to the one on the current feature the value for order on this attribute is 1 more than on the previous feature.
Hope this helps!
You can set the AttributeCreator to Advanced: Enable Adjacent Feature Attributes 1 Prior Feature.
Then create an Order attribute and fill it depending on a Conditional Value.
The condition is:
If featurer-1].section = section and featurer-1].direction = direction Then featurer-1].order else featurer-1].order+1
You have to set the default value correct because the first feature can't be evaluated.
If you have trouble setting this up, please apply a screenshot of your workbench/transformer settings so I can see what goes wrong.
This is how I've solved it:
- Use an AttributeCreator to create an attribute "order" and set its value to 1
- Set up the AttributeManager with the Advanced Attribute Handling to look at the attributes of the previous feature.
- Set up a Conditional Value for the attribute order: if the value of Section or Direction of the previous feature is different to the one on the current feature the value for order on this attribute is 1 more than on the previous feature.
Hope this helps!
thank you very much, i didn't pay attention
This is how I've solved it:
- Use an AttributeCreator to create an attribute "order" and set its value to 1
- Set up the AttributeManager with the Advanced Attribute Handling to look at the attributes of the previous feature.
- Set up a Conditional Value for the attribute order: if the value of Section or Direction of the previous feature is different to the one on the current feature the value for order on this attribute is 1 more than on the previous feature.
Hope this helps!
Did not see your reaction when i posted. Just curious, why use an AttributeManager?
It is rarely my preference to use the AttributeManager, but maybe I should change my mind.
- I like to see where attributes are removed, filled, keeped or renamed so I tend to use these more.