Skip to main content
Solved

if problems and get attribute from other object


Forum|alt.badge.img

Hallo guys!

I have a good question about the if statement (pls look on the pictures). I wanna check if the line is the first one (with Count) then i set my s1=0, after that i want that the next s-value is s2=lenght(first line) and on the next line i need s3= length(first line)+lenght(second line). Its just a straight road so i just have straight lines. I have now the question how can i get the lenght from the last object to fill up the s-value from the next one?

 

My next question is if i try the "if Statement" it include the word "xmlns" into the file and i have no idea why. I hope anyone have a answer for me.

 

Thanks !

Best answer by ebygomm

To set values of an feature based on the preceding feature you want to look in the AttributeManager or AttributeCreator at the Advanced: Attribute Value Handling and Enable Adjacent Feature Attributes options.

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

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+50

You're using the XMLTemplater I assume? It really wants the output to be properly formatted XML. You might want to try using the "Validate Attribute/Template Names" parameter, it defaults to Yes but if you set it to No you might get a different result.


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • August 6, 2018

To set values of an feature based on the preceding feature you want to look in the AttributeManager or AttributeCreator at the Advanced: Attribute Value Handling and Enable Adjacent Feature Attributes options.


Forum|alt.badge.img

takashi
Evangelist
  • August 6, 2018
rolandpilsinger wrote:
I think you can adopt @egomm suggestion by inserting required transformer(s) between the LengthCalculator and the XMLTemplater to add an attribute having desired "s" value to each feature beforehand.

Forum|alt.badge.img

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • August 6, 2018

@rolandpilsinger

Statistics calculator in Cumulative mode is very underrated.

(In this case sum the length and use cumulative output. Gpourp by might be required if u got subsets)

(TIP: this transformer is great for creating tables and or legends from data to insert in pdf's, png's etc.)


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