I am using LineJoiner to merger street segments together based on the attribute STREET. Each segment contains STREET, FROM_STREET and TO_STREET and a SEQUENCE. I have ordered them by Sequence before the LineJoiner transformer and now I want to extract the FROM_STREET and TO_STREET for the merged segments. I renamed ROAD{0}.FROM_STREET to FROM_STREET, and that works fine. But how do I tell the List Element Selection to be the last element? It won't take -1 or any non-number or _element_count. Is there another way to do this? Ideally I would like it to be something simple like ROAD{MAX}.TO_STREET.
Solved
rename last index in a list
Best answer by roland.martin
I'd probably use a ListIndexer here - it pushes all the list items at index 0 or -1 into attributes, with an optional prefix.
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.