Skip to main content

Hello everyone I got a little lost in this problem, I have three columns segment, direction.

I would like to obtain another order column which will be incremented in the event that we have a change either on the segments or on the direction, I tried to give you an example which explains the situation, thank you in advancequestion

This is how I've solved it:

  1. Use an AttributeCreator to create an attribute "order" and set its value to 1
  2. Set up the AttributeManager with the Advanced Attribute Handling to look at the attributes of the previous feature.
  3. 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.

Screenshot 2021-07-16 at 14.58.28Hope 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:

  1. Use an AttributeCreator to create an attribute "order" and set its value to 1
  2. Set up the AttributeManager with the Advanced Attribute Handling to look at the attributes of the previous feature.
  3. 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.

Screenshot 2021-07-16 at 14.58.28Hope this helps!

thank you very much, i didn't pay attention


This is how I've solved it:

  1. Use an AttributeCreator to create an attribute "order" and set its value to 1
  2. Set up the AttributeManager with the Advanced Attribute Handling to look at the attributes of the previous feature.
  3. 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.

Screenshot 2021-07-16 at 14.58.28Hope 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.

 


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.

 

thanks it work


Reply