1

I have a 100x100 grid made up of square (1x1) polygons. I would like to assign each square a unique number. I have used the Counter transformer in FME, but this assigns the numbers in the grid vertically i.e.

1 5 9
2 6 10
3 7 11
4 8 12

Whereas I would like to count as follows:

1 2 3
4 5 6
7 8 9
10 11 12

If Counter isnt the correct way to approach this, please suggest an alternative transformer!

1

1 Answer 1

2

I think the counter is fine, you just need to sort the data in a different order. One way to do this is to use the BoundsExtractor to get the min max x y. Then use a Sorter _ymax Numeric Descending and _xmin Numeric Ascending.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.