Skip to main content
Solved

How to convert coordinate values of feature and work with list

  • December 7, 2017
  • 4 replies
  • 79 views

lazarlubomir
Contributor
Forum|alt.badge.img+10

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).

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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.

4 replies

david_r
Celebrity
  • 8394 replies
  • 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+22
  • Contributor
  • 2179 replies
  • 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
  • 8394 replies
  • December 7, 2017

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+10
  • Author
  • Contributor
  • 165 replies
  • December 8, 2017

Thank You so much, it works!