Skip to main content

Hello,

I try to solve two problems. Database in my project contains many types of geometry - points, lines, polygons. I need to do bulk conversion of every coordinate by 2 decimal places. E.g. One point feature has X coordinate 152,125 and Y coordinate 696,745. I need to convert these values to X coordinate 15212,5 and Y coordinate 69674,5. Does anybody idea how to solve this problem please?

Second problem is about work with lists. I have met many times situations when I use list in XML templater. I had to divide values of any attributes in list, so I have to specify index of feature in list, e.g. {fme:get-list-attribute("_indices{0}.x")}. But how can I specify, that I want to put there all values without index 0 please?

Thank You so much!

Lubo

For your first question, have a look at the CoordinateRounder.

For your second question you can use the ListExploder and a Tester to filter away the feature where _element_index = 0.


To get from 152.125 to 15212.5 you can use the Scaler transformer (multiply all coordinate values by 100).


To get from 152.125 to 15212.5 you can use the Scaler transformer (multiply all coordinate values by 100).

Good catch, didn't see that it wasn't a simple rounding operation.

Thank You so much, it works!


Reply