Skip to main content
Solved

Can you round to the nearest even number using AttributeRounder or CoordinateRounder?


Forum|alt.badge.img+1

Hi, I would like to round a elevation value to the nearest even number. Is there a way to do this, perhaps using AttributeRounder or CoordinateRounder?

I am using FME Desktop 2016.

Thanks

Best answer by redgeographics

If you use the expression @round(@Value(attr)/2)*2 in an AttributeManager or AttributeCreator it should do the trick.

View original
Did this help you find an answer to your question?
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.

5 replies

takashi
Celebrity
  • July 11, 2017
Does the elevation value have decimal places?

 

 


Forum|alt.badge.img+1
  • Author
  • July 11, 2017
takashi wrote:
Does the elevation value have decimal places?

 

 

Hi Takashi, Yes it does have decimal places. Thanks

 


redgeographics
Celebrity
Forum|alt.badge.img+58
  • Celebrity
  • Best Answer
  • July 11, 2017

If you use the expression @round(@Value(attr)/2)*2 in an AttributeManager or AttributeCreator it should do the trick.


takashi
Celebrity
  • July 11, 2017
Oops, my question was stupid. I wanted to ask whether the resulting elevation should have decimal places, but "even" number is usually an integer. @redgeographics suggested the way to go.

 


Forum|alt.badge.img+1
  • Author
  • July 11, 2017

Thanks guys, @redgeographicsanswer worked !

 


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