AttributeRounder: High-precision rounding procedure resulted in overflow; original value kept
Does anyone know how to prevent this warning and why we get it and is this something we should worry about or is it safe to ignore it?
AttributeRounder: High-precision rounding procedure resulted in overflow; original value kept
Does anyone know how to prevent this warning and why we get it and is this something we should worry about or is it safe to ignore it?
this warning message is not related to either ArcGIS or Oracle, you will sometimes see this message from an AttributeRounder regardless of how you use it. The reason for this message has always been a mystery to me, as rounding a floating point number correctly should be fairly easy.
That said, I've never really had any problems ignoring this warning. However, if you think this is causing problems in your process, consider doing the rounding with a PythonCaller. Example:
-----
def roundAttribute(feature):
numberOfDigits = 2
attributeToRound = "myAttributeNameHere"
value = float(feature.getAttribute(attributeToRound))
if value:
feature.setAttribute(attributeToRound, round(value, numberOfDigits))
-----
This will round the attribute named "myAttributeNameHere" to 2 digits. Modify as needed.
Hope this helps.
David
Another way to round is to make use of the round function in the expressionevaluator
Remember, though, that the Round() function alone will return an integer, i.e. you will lose all the decimals.
To round to the nearest 2 decimals, use this expression:
Round(@Value(myAttribute)*100)/100.0
Use 1000 for 3 decimals, etc.
David