Skip to main content

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 !

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.


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.


@redgeographics: yes i tried it with the XML Templater (picture). I want to try a XML format but get the OpenDRIVE structure for it. The change to "no" change not my problem with the "xmlns".@egomm: Is there no option for use the XMLTemplater to get information about the lenght from the last object ?


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.
Yes it works ! Thank you very much :D

 

 


@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.)


Reply