Solved

Counter transformer


Badge

Hello, I have a question about Counter transformer. I have .SHP with line elements and I need to give every line an ID but Counter transformer for some group of lines gives IDs that are apart not in order. Example, 1.png I have a line that is given an ID 0, line left of this line has an ID 1, but line right of it has an ID 86(2.png), same thing is at other end of this chain of lines(Left line has an ID of 86, "central" ID 13, and right ID 12, 3.png). Is there a possibility that FME gives ID in sequence from left to right, North to South it doesn't matter just some kind of sequence? Thank you in advance.

 

1.PNG

2.PNG

3.PNG

icon

Best answer by takashi 4 May 2018, 12:37

View original

2 replies

Userlevel 2
Badge +17

The Counter just generates sequential number in the input order. It won't consider any spatial relationships. If you want to create sequential number in the connecting order of the lines, you will have to sort the lines appropriately beforehand.

If the lines are touching each other at their end nodes exactly, these Q&A; might help you.

Badge

The Counter just generates sequential number in the input order. It won't consider any spatial relationships. If you want to create sequential number in the connecting order of the lines, you will have to sort the lines appropriately beforehand.

If the lines are touching each other at their end nodes exactly, these Q&A; might help you.

@takashi, thank you very much. Your solution does the job better than i hoped, segment number is additional attribute that I need.

 

Reply