Skip to main content
Solved

How to convert coordinate values of feature and work with list


lazarlubomir
Contributor
Forum|alt.badge.img+7

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

Best answer by erik_jan

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

View original
Did this help you find an answer to your question?

4 replies

david_r
Celebrity
  • December 7, 2017

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.


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • Best Answer
  • December 7, 2017

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


david_r
Celebrity
  • December 7, 2017
erik_jan wrote:

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.

lazarlubomir
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • December 8, 2017

Thank You so much, it works!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings