Skip to main content
Question

attribute rounding to other than numerical convention, or truncation.

  • January 30, 2017
  • 2 replies
  • 62 views

I have an ascii xyz file i need to convert to a hyd93 (binary) format. The z value needs to be rounded to a nonstandard non-numerical rounding,(precision of 2-3 decimal places to one decimal place, 0.n99 and up round up, otherwise round down) or truncated. coordinate rounder does not seem to offer the needed functionality. Is ther another transfromer that has the needed functionality, rounding or truncation?

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.

2 replies

itay
Supporter
Forum|alt.badge.img+19
  • Supporter
  • January 30, 2017

Have a look at the StringFormatter for truncating and the attributerounder for rounding.

I think you will need to come up with your own rounding mechanism by truncating via the StringFormatter and testing the decimal number to decide with ones to round.

Hope this helps.


takashi
Celebrity
  • January 30, 2017

Hi @cruiserad, I would try the following two steps:

  1. Add 0.001 to the z value.
  2. Round off the resulting value with the AttributeRounder (Decimal Place: 1, Round-Off Direction: Down).