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?

5 replies

takashi
Influencer
  • 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+50
  • 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
Influencer
  • 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