Skip to main content
Solved

AttributeManager

  • July 16, 2021
  • 5 replies
  • 53 views

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

Best answer by redgeographics

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!

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.

5 replies

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • Best Answer
  • July 16, 2021

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!


jkr_wrk
Influencer
Forum|alt.badge.img+35
  • 424 replies
  • July 16, 2021

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 feature[-1].section = section and feature[-1].direction = direction Then feature[-1].order else feature[-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.

 


  • Author
  • 10 replies
  • July 16, 2021

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


jkr_wrk
Influencer
Forum|alt.badge.img+35
  • 424 replies
  • July 16, 2021

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.

 


  • Author
  • 10 replies
  • July 16, 2021

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 feature[-1].section = section and feature[-1].direction = direction Then feature[-1].order else feature[-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